comparison agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 0b3d1ec6eaee
children 9a094d29af19
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
63 printValMB("NewSize = ", getFlagValue("NewSize", flagMap)); 63 printValMB("NewSize = ", getFlagValue("NewSize", flagMap));
64 printValMB("MaxNewSize = ", getFlagValue("MaxNewSize", flagMap)); 64 printValMB("MaxNewSize = ", getFlagValue("MaxNewSize", flagMap));
65 printValMB("OldSize = ", getFlagValue("OldSize", flagMap)); 65 printValMB("OldSize = ", getFlagValue("OldSize", flagMap));
66 printValue("NewRatio = ", getFlagValue("NewRatio", flagMap)); 66 printValue("NewRatio = ", getFlagValue("NewRatio", flagMap));
67 printValue("SurvivorRatio = ", getFlagValue("SurvivorRatio", flagMap)); 67 printValue("SurvivorRatio = ", getFlagValue("SurvivorRatio", flagMap));
68 printValMB("PermSize = ", getFlagValue("PermSize", flagMap)); 68 printValMB("MetaspaceSize = ", getFlagValue("MetaspaceSize", flagMap));
69 printValMB("MaxPermSize = ", getFlagValue("MaxPermSize", flagMap)); 69 printValMB("MaxMetaspaceSize = ", getFlagValue("MaxMetaspaceSize", flagMap));
70 printValMB("G1HeapRegionSize = ", HeapRegion.grainBytes()); 70 printValMB("G1HeapRegionSize = ", HeapRegion.grainBytes());
71 71
72 System.out.println(); 72 System.out.println();
73 System.out.println("Heap Usage:"); 73 System.out.println("Heap Usage:");
74 74
116 printG1Space("G1 Old Generation:", oldRegionNum, 116 printG1Space("G1 Old Generation:", oldRegionNum,
117 g1mm.oldUsed(), g1mm.oldCommitted()); 117 g1mm.oldUsed(), g1mm.oldCommitted());
118 } else { 118 } else {
119 throw new RuntimeException("unknown SharedHeap type : " + heap.getClass()); 119 throw new RuntimeException("unknown SharedHeap type : " + heap.getClass());
120 } 120 }
121 // Perm generation shared by the above
122 Generation permGen = sharedHeap.permGen();
123 System.out.println("Perm Generation:");
124 printGen(permGen);
125 } else if (heap instanceof ParallelScavengeHeap) { 121 } else if (heap instanceof ParallelScavengeHeap) {
126 ParallelScavengeHeap psh = (ParallelScavengeHeap) heap; 122 ParallelScavengeHeap psh = (ParallelScavengeHeap) heap;
127 PSYoungGen youngGen = psh.youngGen(); 123 PSYoungGen youngGen = psh.youngGen();
128 printPSYoungGen(youngGen); 124 printPSYoungGen(youngGen);
129 125
132 System.out.println("PS Old Generation"); 128 System.out.println("PS Old Generation");
133 printValMB("capacity = ", oldGen.capacity()); 129 printValMB("capacity = ", oldGen.capacity());
134 printValMB("used = ", oldGen.used()); 130 printValMB("used = ", oldGen.used());
135 printValMB("free = ", oldFree); 131 printValMB("free = ", oldFree);
136 System.out.println(alignment + (double)oldGen.used() * 100.0 / oldGen.capacity() + "% used"); 132 System.out.println(alignment + (double)oldGen.used() * 100.0 / oldGen.capacity() + "% used");
137
138 PSPermGen permGen = psh.permGen();
139 long permFree = permGen.capacity() - permGen.used();
140 System.out.println("PS Perm Generation");
141 printValMB("capacity = ", permGen.capacity());
142 printValMB("used = ", permGen.used());
143 printValMB("free = ", permFree);
144 System.out.println(alignment + (double)permGen.used() * 100.0 / permGen.capacity() + "% used");
145 } else { 133 } else {
146 throw new RuntimeException("unknown CollectedHeap type : " + heap.getClass()); 134 throw new RuntimeException("unknown CollectedHeap type : " + heap.getClass());
147 } 135 }
148 136
149 System.out.println(); 137 System.out.println();