Domanda

Are there any open specifications for jmap heap dump format?

Thanks for help!

È stato utile?

Soluzione

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.

Altri suggerimenti

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top