6

Possible Duplicate:
How to analyze PermGen contents?

I want to know what is occupying the PermGen space - string intern() or classes? Is there any tool which will help with this analysis?

Community
  • 1
  • 1
user1325695
  • 105
  • 1
  • 2
  • 6
  • Those links should answer your first question: http://stackoverflow.com/questions/1262328/how-is-the-java-memory-pool-divided/1262474#1262474 and http://stackoverflow.com/questions/9095748/method-area-and-permgen. – assylias May 25 '12 at 11:03
  • I don't see how those links help the OP at all. – Perception May 25 '12 at 11:16
  • Look at this question: http://stackoverflow.com/questions/2842982/how-to-analyze-permgen-contents – Konstantin V. Salikhov May 25 '12 at 11:18
  • @Perception They give some information about what goes to PermGen but your link is admittedly better. – assylias May 25 '12 at 11:20
  • 1
    @assylias - The OP does appear to know what PermGen is for, hence my comment. In any case, the question looks like a duplicate. – Perception May 25 '12 at 11:32
  • I tried the utility to print a running JVM's string literal pool(https://github.com/puneetlakhina/javautils/blob/master/com/blogspot/sahyog/PrintStringTable.java)... But i'm getting below error... Attaching to process ID 8980, please wait... Error attaching to process: Timed out while attempting to connect to debug server (please start SwDbgSrv.exe).. – user1325695 May 25 '12 at 11:52
  • Any idea.. how to start SwDbgSrv.exe in windows 7 – user1325695 May 25 '12 at 11:53
  • @user1325695 You should create a new question with that issue. – assylias May 25 '12 at 14:50

3 Answers3

3

For Memory Analysis

  1. Use jvisualvm.exe present in bin directory of JDK

  2. Using jvisualvm take the Thread/Heap dump depending on the process id of the Application you need to profile.

  3. Memory Analyzer (MAT) an eclipse plugin. where you can import the heap dump from jvisualvm and analyze for possible leaks.

jbochi
  • 28,816
  • 16
  • 73
  • 90
Srinivas M.V.
  • 6,508
  • 5
  • 33
  • 49
1

You can use monitoring tools that are in the bin folder of your jdk, as "jvisualvm" or "jconsole"

Xosler
  • 275
  • 4
  • 13
0

I use Yourkit to analyse what is in the heap-space. It is not free but it is a really big help when analysing memory issues and/or performance issues. (They have an evaluation version)

tom
  • 2,735
  • 21
  • 35