How to analyse the heap dump using jmap in java

前端 未结 7 631
遇见更好的自我
遇见更好的自我 2020-12-02 12:14

I am creating heap dump using below command:

jmap -dump:file=DumpFile.txt 

I have opened the generated file - DumpF

相关标签:
7条回答
  • 2020-12-02 12:50

    You can use jhat (Java Heap Analysis Tool) to read the generated file:

    jhat [ options ] <heap-dump-file>
    

    The jhat command parses a java heap dump file and launches a webserver. jhat enables you to browse heap dumps using your favorite webbrowser.

    Note that you should have a hprof binary format output to be able to parse it with jhat. You can use format=b option to generate the dump in this format.

    -dump:format=b,file=<filename>
    
    0 讨论(0)
提交回复
热议问题