Suppose you're working on a C++ program which allocates multiple large buffers at different points in time. Suppose also this allocation doesn't necessary happen by kernel sbrk-like calls, but also internally, i.e. maybe there's some pre-allocation of slabs and allocations within that slab.
Now, you would like to get a timeline, in which different bars/lines correspond to different buffers that you allocate - with the start and end of their life (allocation and de-allocation) marked.
The format could be either raster, or even something as simple as a CSV table with, say, filename,line,size,start "time",end "time"
I put "time" in quotes because although it would be nice to get actual wall-clock time, any well-ordered value might work.
- Would be nice if this would reasonably support multi-threaded work, but even if it doesn't, that's fine too.
- The way I phrased the requirement, this will definitely require some modification in the code, so probably this will need to be either a library-only solution or a library + executable tool
- Supports Linux