Re: Partial heap profiling with Massif

LEPAREUR Loic <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Organization CEA-DAM
Message-ID <[email protected]>
Le 21/09/2020 à 17:04, Milian Wolff a écrit :
> On Donnerstag, 17. September 2020 15:32:04 CEST John Reiser wrote:
>> On 2020-09-17 LEPAREUR Loic wrote:
>>> Several years ago, I developed a Massif patch to let the client code
>>> select which part of the code should be profiled with Massif.
>> Today this is much less interesting unless you compare and contrast with
>> https://github.com/KDE/heaptrack .  Do a web search for "heaptrack vs
>> massif". Consider particularly "A Faster Massif" in
>> https://milianw.de/tag/heaptrack , and
>> https://milianw.de/tag/massif-visualizer .
> In other news: I just pushed a bunch of patches to heaptrack git which allow
> you to do time-diffing. I.e. you can now select a time range in the charts and
> then request filtering to show the delta costs between the two time points.
>
> This should allow you to solve your problem nicely.
>
> Alternatively, you can also runtime-attach heaptrack after you finished your
> initialization phase to only record the main computational loop. The overhead
> should be minimal or actually close to zero when your main loop isn't
> allocating anything.
>
> Cheers
>
OK, thanks for pointing that out. I didn't know about it, I will give it 
a try.

Heaptrack requires recent versions of KChart and Qt for the GUI and it 
isn't easy to upgrade them here. And since you LD_PRELOAD Heaptrack, it 
would be very easy to add client requests mechanism, but I will try 
vanilla version first.

Cheers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.