How to analyse the heap dump using jmap in java

Chaitanya picture Chaitanya · Feb 28, 2013 · Viewed 207k times · Source

I am creating heap dump using below command:

jmap -dump:file=DumpFile.txt <process-id>

I have opened the generated file - DumpFile.txt but it is not in readable format. So please let me know how to analyze the data in the generated file.

Answer

yves.beutler picture yves.beutler · Jun 12, 2013

You should use jmap -heap:format=b <process-id> without any paths. So it creates a *.bin file which you can open with jvisualvm.exe (same path as jmap). It's a great tool to open such dump files.