问题描述
我想获得PermGen的转储以了解它为何填充。有没有办法分析这个?我已经知道像log4j,tomcat webapp重新加载等常见的嫌疑人,但我的应用程序中也有一些自定义代理生成代码,只是想深入了解。
I want to get a dump of the PermGen to see why it is filling. Is there a way to analyze this? I already know about the common suspects like log4j, tomcat webapp reloading etc, but I have some custom proxy generation code in my application, too, and just want to look under the hood.
这有可能吗?
推荐答案
PermGen通常由字符串文字池和加载的类组成。为了回答部分问题,即字符串文字池,我编写了一个实用程序来打印正在运行的JVM的字符串文字池。它可以在这里找到:
The PermGen normally consists of the string literal pool and loaded classes. To answer part of your problem, i.e. the string literal pool I wrote a utility to print a running JVM's string literal pool. It is available here:
它基于,这是用于通过jmap工具打印permgen统计数据。
It is based on PermStat, which is the class used to print permgen stats by the jmap tool.
这篇关于如何分析PermGen内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!