How to analyze PermGen contents?

后端 未结 4 919
时光取名叫无心
时光取名叫无心 2020-11-28 04:57

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 et

4条回答
  •  遥遥无期
    2020-11-28 05:46

    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:

    https://github.com/puneetlakhina/javautils/blob/master/src/com/blogspot/sahyog/PrintStringTable.java

    It is based on PermStat, which is the class used to print permgen stats by the jmap tool.

提交回复
热议问题