Leaked memory Flamegraph

Milian Wolff mail at milianw.de
Fri Aug 18 19:32:29 UTC 2017


On Dienstag, 15. August 2017 19:27:39 CEST Breno GuimarĂ£es wrote:
> Hi everybody,
> 
> First of all, thanks for this awesome tool. I work with a software that may
> use dozens of GB and Heaptrack is being able to nicely handle that kind of
> usage. (We have use cases that go over hundreds of GB, that I will try this
> week...fingers crossed!)

Cool, sounds good. And did it work out with your even higher memory 
consumption?

> So, for the suggestion.
> 
> I work with an old environment and a bit out of my control, so I haven't
> been able to configure heaptrack_gui. But I've been able to extract
> relevant data, by changing heaptrack_print a bit.
> 
> I wanted to see the memory profile after a data structure is built in my
> software. The allocation flamegraph was not good, because many of the
> allocations were temporary, and they are not relevant to me.
> 
> I changed heaptrack_print to only consider leaked allocations, and print
> them by bytes and not number of  allocations.
> 
> Then, my use is to run my program, and attach heaptrack right before the
> data structure starts to be built. After it's done, I kill my program
> leaving it no room for deallocating the data structure.
> heaptrack will see that as leaked memory, and using heaptrack_print
> -flamegraph (modified to print leaks), I've been able to see what parts of
> the data structure were consuming more memory, by looking at which stacks
> allocated more data.
> 
> What do you think about a modifier switch to let the flamegraph display
> only leaked memory? That could be useful in the actual leak scenario as
> well, so people could visualize detect what is leaking most in their
> software.
> 
> I'd be willing to write that code, btw. It would be just a matter of adding
> the switch and choosing what to print.

Yes, please contribute such a feature. heaptrack_gui has this already, and I 
personally don't use heaptrack_print myself anymore. The GUI is much nicer. If 
at all possible, try to get it running on your older machine. Or at least try 
the GUI on a laptop or similar with a newer distro. The heaptrack data files 
are fully relocatable.

Cheers

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/heaptrack/attachments/20170818/86f59088/attachment.sig>


More information about the Heaptrack mailing list