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/
,可以看到如下分析结果:
参考资料
文档信息
- 本文作者:Bob.Zhu
- 本文链接:https://adolphor.github.io/2021/09/29/05-jvm-jhat/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)