1

Are there any open specifications for jmap heap dump format?

Thanks for help!

trincot
  • 317,000
  • 35
  • 244
  • 286
pbespechnyi
  • 2,251
  • 1
  • 19
  • 29

2 Answers2

4

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.

jalopaba
  • 8,039
  • 2
  • 44
  • 57
  • 1
    Yes, I know this. Thanks for the answer. As I specified above, I need heap dump to be parsed by my program (module). To do that I need some docs. I googled for them, but didn't find any useful information. – pbespechnyi Mar 11 '13 at 16:15
0

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

user1251323
  • 95
  • 1
  • 6