Hacker News new | ask | show | jobs
by kohlerm 851 days ago
http://kohlerm.blogspot.com/2009/02/how-to-really-measure-me... do we really still not have a decent memory usage analysis tool for c/ C++ ?
3 comments

MAT is useful enough on its own to make me seriously consider Java almost everywhere. So many tricky memory leaks in other languages made completely trivial.

Yes, in many languages you can combine a few things plus a core dump and figure leaks out too... but average people actually use MAT because it's largely transparent, and it can operate on running processes. Very few languages can compete with that in practice, much less with reasonable performance.

Is there a tool for the jvm that can track data locality? TFA mentions three for Linux binaries but that won’t do the mapping to Java source if we can combine them with `java -jar` at all.
> do we really still not have a decent memory usage analysis tool for c/ C++ ?

Shameless plug: not sure if I'd call it decent, but you might want to check my Bytehound for more in-depth analysis:

https://github.com/koute/bytehound

It is like others relying on tracking memory allocations. Which has it"s place, but to really analyze memory usage you would need to be able to analyze which "objects" are keeping other objects alive (dominator tree in MAT)
IIUC then you might be looking for https://github.com/facebookexperimental/object-introspection - very new and not yet easily usable outside of the Meta sphere, but goes into that direction, or?
What is not decent about heaptrack or similar tools?
It does not really allow you to analyze what contributes to memory usage in a graph of "objects".
So more something like dhat from valgrind? see https://valgrind.org/docs/manual/dh-manual.html ?