On Donnerstag, 10. September 2020 15:26:37 CEST folkert wrote:
> Hi,
> 
> How can I obtain the number of mallocs per type in a time-frame using
> massif? I'm NOT interested in the total in use, I would like to know how
> often type x is allocated between t+1 and t+2.

To my knowledge, this data is not recorded by Massif. You could try to have a 
look at heaptrack [1] instead.

[1]: https://invent.kde.org/sdk/heaptrack

Note though that on Linux, malloc does not retain any type information. As 
such, even with heaptrack you cannot easily filter by type. But by leveraging 
the flamegraph you can often still get a similar intuition based on the 
callstacks. I have an idea to parse the callstack code lines to find type 
information from the call to `new` but that's probably quite hairy to get 
right in practice. Suggestions welcome on how to trace the type information!

And finally, with heaptrack it is also not yet easily doable to get a diff 
between two time stamps. Also a feature I've long thought about implementing, 
but never got around to...

Cheers

-- 
Milian Wolff
m...@milianw.de
http://milianw.de

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to