简体   繁体   English

老一代物件的统计数据?

[英]Statistics of objects in old generation?

Is there any tool to view object statistics on the different generations of a JVM Heap? 是否有任何工具可以查看JVM堆的不同代的对象统计信息? I'm looking into a potential memory leak and need some data over the different generations. 我正在研究潜在的内存泄漏,需要不同代的一些数据。 The use case I have is to take a snapshot over object in old generations, wait, and then take another snapshot to compare. 我的用例是在旧代中拍摄对象的快照,等待,然后拍摄另一个快照进行比较。

JVisualVM offers statistics over created object, but that doesn't help me much as I don't see whether or not a particular object is being promoted or tenured faster than it should. JVisualVM提供了有关已创建对象的统计信息,但这对我没有多大帮助,因为我没有看到特定对象是否正在被提升或终身比它应该更快。

Jmap offers statistics over the different generations, but not on an object basis. Jmap提供不同代的统计信息,但不提供基于对象的统计信息。 In that tool I can only see that the old generation is growing... 在那个工具中,我只能看到老一代正在成长......

Run your app on Yourkit .It has got generation view tab.You can take snapshots of your heap and compare what objects are still alive between snapshots . 在Yourkit上运行你的应用程序。它有生成视图选项卡。你可以拍摄堆的快照,并比较快照之间仍然存在的对象。

Documentation 文档

Here is an useful answer by @JT . 这是@JT的有用答案

For more info check this link 有关更多信息,请查看此链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM