如何查看jvm中老年代中的对象数据
可以通过以下步骤查看jvm中老年代中的对象数据:
-
使用jmap命令生成heap dump文件:jmap -dump:format=b,file=
-
使用jhat命令启动一个本地http服务器:jhat
-
在浏览器中访问http://localhost:7000/,可以看到jvm堆中的对象信息
-
在页面上点击Old Generation,可以查看老年代中的对象信息
-
可以按照类名、实例数、内存占用等属性进行排序和过滤,找到所需的对象数据。
原文地址: https://www.cveoy.top/t/topic/hkdu 著作权归作者所有。请勿转载和采集!