Closed matklad closed 2 years ago
A hack to get what I want using what I have: add std::process::abort()
to turn live into leaked
Yes you can.
You can probably either:
a) on the overview page zoom into the region which excludes the end part (left click and hold; double click to reset if you made a mistake), right click and open the allocations from that range, and then from the filter in the lifetime tab select "Only not deallocated in current time range",
b) use this scripting method either as a custom filter or in the scripting console, e.g. allocations().only_not_deallocated_until_at_most(data().runtime() * 0.98)
which will give you a list of all of the allocations which were not deallocated within the 98% of the total program runtime.
Awesome, this works! The only thing I was missing is the actual flamegraph, which is over here:
Consider surfacing this in UI as "flamegraph of live allocations" context-menu entry on a right click in the overview
Looking somewhat more carefully, this doesn't quite work, but seems easy to fix https://github.com/koute/bytehound/pull/88
With the version on master
you can now right click on the graph and select "Allocations: alive here" to get a list of all of the allocations alive at a given point in time.
Works like a charm, many thanks!
I am profiling an application which uses obscene amounts of memory, but is not, strictly speaking, leaking memory: if I kill the app, everything is cleanly deallocated.
Still, I'd love to know what takes all the memory. I think what I need is to take a look at the live allocations at some specific point in time, and get a famegraph. This'll give me essentially a profile for a heap snapshot at a point in time.
Can I already get this with bytehound? I've seen flamegraph for leaked memory, and the graph of the total live allocations, but neither is quite what I am looking for.