JVM - jhat工具

2021/09/29 JVM 共 1219 字,约 4 分钟
Bob.Zhu

jhat 用于分析 heapdump 文件,它会建立一个 HTTP/HTML 服务器,让用户可以在浏览器上查看分析结果。

jhat 使用方法

jhat ./heap.hprof
Reading from ./heap.hprof...
Dump file created Thu Sep 30 15:30:54 CST 2021
Snapshot read, resolving...
Resolving 2095248 objects...
Chasing references, expect 419 dots...................................................................................................................................................................................................................................................................................................................................................................................................................................
Eliminating duplicate references...................................................................................................................................................................................................................................................................................................................................................................................................................................
Snapshot resolved.
Started HTTP server on port 7000
Server is ready.

查看结果

浏览器访问 http://127.0.0.1:7000/,可以看到如下分析结果:

jhat分析结果

参考资料

文档信息

Search

    Table of Contents