How to analyse the heap dump using jmap in java

前端 未结 7 686
遇见更好的自我
遇见更好的自我 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 ] 
    

    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=
    

提交回复
热议问题