Frage

Are there any open specifications for jmap heap dump format?

Thanks for help!

War es hilfreich?

Lösung

If you need an histogram of the heap, you can use jmap -histo <pid> to get the histogram from your live JVM. If you already have the heap dump file, with Eclipse MAT (Eclipse Memory Analyzer Tool) you can load the dump and easily get the histogram you are looking for.

Maybe Lars Vogel tiny tutorial on it can be an easy first step.

Regarding the hprof binary format, I bookmarked this some time ago: http://java.net/downloads/heap-snapshot/hprof-binary-format.html, but developing your own parser to get an histogram is totaly overkill.

Andere Tipps

Other simpler solution for histogram is to use jhat without being worried about the format. you can drill down and do various things.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top