How to analyze PermGen contents?

后端 未结 4 922
时光取名叫无心
时光取名叫无心 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:41

    If you're looking to get a list of all classes loaded you can use jconsole. Click on the classes tab then click "Verbose Output". That will print each class that is loaded to stdout. I found this very useful tracking down a JAXB proxy class issue.

    You may have to launch your application with the -Dcom.sun.management.jmxremote command line option in order for jconsole to attach to it.

提交回复
热议问题