Re: massif & counts per type

Milian Wolff <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <4337063.6LilFOjNjJ@milian-workstation>
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
[email protected]
http://milianw.de

_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEezawi1aUvUGg3A1+8zYW/HGdOX8FAl9bU8AACgkQ8zYW/HGd
OX8lWw//ScdHKUx1YtWIm+ZHu2q8FQrPIW04OrrImW8oGA+FibEX/V4jhyed4LrR
nd6lACOqTNjRFgus1qvbXE8A8BeYc02sPLLh6+mi6Ew+NCt9KTgkMLH2AmzfjnxV
gxPreuuLEzjwNf2vh5c013upWz/EGKfUKYqCn8J4NzL9LOTXl/r/9O+Hqrw1+aR7
CD0472/5rAfe6Ol9hUa+PZ+nymuzoV64vC9hvPJstaHYvrAPPMxgF51/Vh0wS6e5
msvc6sg9vbl+CcmUN8yQBYsK/R5gzzv2OlmNrhyPY/7z2OsGLFtxI78OEUbb/f8/
gVQYLmi1VgWQq6FXsDijraQ9vAjrDhwBSQMSYyvWFL/qUWwddDb3zyL3ufQsBQpr
UFbI7VBlm0VzBTAJkdl1n58wiPKqKV0bHWGIBuL+4PZ95dxXwdDDMznnSl15lno8
YdNY142MT/komynhPU+Yf7Z7eXIL83t/YWvQBTV3687gcmkw4sO88lZiqkNXgaYF
pvbSaoOxBxV1tzzRODe7OBTO+vkbsM3oe6zl4fTQJfOw72+TtGEN/J4pdrGkfUhI
tj9y9+jmDePJNZPcVi9p9IUujJo7wuARmx1ZKEuem7C8k8DIiNRgkCbLyX5Upuzu
vS3u3KN9qj9sVen677ab0iA34hpUT71kK0wxq2lY6JeBOGsD2Fs=
=Qqad
-----END PGP SIGNATURE-----
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.