2

I know that my program invokes the gc in regular intelvals, but I would like to analyse only the generated garbage. I want to know which classes are most frequently abandoned, and much more important, where are those instances created. Generally I want to optimize for escape analysis to reduce the garbage collection to a minimum.

Edit: I am not interested in live objects.

4

1 回答 1

2

JProfiler为您提供有关垃圾收集对象的统计信息。分配树和热点甚至会显示它们的创建位置。

在“记录对象”视图中,将“活动模式”更改为“垃圾收集对象”:

在此处输入图像描述

免责声明:我公司开发 JProfiler。

于 2013-05-01T14:18:37.983 回答