I am working on a high performance code base that is suffering from some performance problems due to container resizing. Inspecting throughput or latency over time shows a pattern in which exponentially increasing latency spikes are separated by exponentially increasing periods of time, suggestive of the doubling in size of containers as capacity increases.
I am having a difficult time tracking down which container is growing by manually searching through the code, and was hoping to track the container reservation with gdb.
Is there a breakpoint (or multiple breakpoints) I can set so that gdb will stop execution if a container reserves more space? I am unsure if the container is a vector, map, or set, so if all three rely on the same underlying call to resize, that might be best. Otherwise, I am happy to set multiple breakpoints.