< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java

Print this page

        

*** 27,36 **** --- 27,37 ---- import java.util.*; import sun.jvm.hotspot.gc.epsilon.*; import sun.jvm.hotspot.gc.g1.*; import sun.jvm.hotspot.gc.parallel.*; import sun.jvm.hotspot.gc.serial.*; + import sun.jvm.hotspot.gc.shenandoah.*; import sun.jvm.hotspot.gc.shared.*; import sun.jvm.hotspot.gc.z.*; import sun.jvm.hotspot.debugger.JVMDebugger; import sun.jvm.hotspot.memory.*; import sun.jvm.hotspot.oops.*;
*** 81,91 **** printValue("NewRatio = ", getFlagValue("NewRatio", flagMap)); printValue("SurvivorRatio = ", getFlagValue("SurvivorRatio", flagMap)); printValMB("MetaspaceSize = ", getFlagValue("MetaspaceSize", flagMap)); printValMB("CompressedClassSpaceSize = ", getFlagValue("CompressedClassSpaceSize", flagMap)); printValMB("MaxMetaspaceSize = ", getFlagValue("MaxMetaspaceSize", flagMap)); ! printValMB("G1HeapRegionSize = ", HeapRegion.grainBytes()); System.out.println(); System.out.println("Heap Usage:"); if (heap instanceof GenCollectedHeap) { --- 82,96 ---- printValue("NewRatio = ", getFlagValue("NewRatio", flagMap)); printValue("SurvivorRatio = ", getFlagValue("SurvivorRatio", flagMap)); printValMB("MetaspaceSize = ", getFlagValue("MetaspaceSize", flagMap)); printValMB("CompressedClassSpaceSize = ", getFlagValue("CompressedClassSpaceSize", flagMap)); printValMB("MaxMetaspaceSize = ", getFlagValue("MaxMetaspaceSize", flagMap)); ! if (heap instanceof ShenandoahHeap) { ! printValMB("ShenandoahRegionSize = ", ShenandoahHeapRegion.regionSizeBytes()); ! } else { ! printValMB("G1HeapRegionSize = ", HeapRegion.grainBytes()); ! } System.out.println(); System.out.println("Heap Usage:"); if (heap instanceof GenCollectedHeap) {
*** 124,133 **** --- 129,146 ---- System.out.println("PS Old Generation"); printValMB("capacity = ", oldGen.capacity()); printValMB("used = ", oldGen.used()); printValMB("free = ", oldFree); System.out.println(alignment + (double)oldGen.used() * 100.0 / oldGen.capacity() + "% used"); + } else if (heap instanceof ShenandoahHeap) { + ShenandoahHeap sh = (ShenandoahHeap) heap; + long num_regions = sh.numOfRegions(); + System.out.println("Shenandoah Heap:"); + System.out.println(" regions = " + num_regions); + printValMB("capacity = ", num_regions * ShenandoahHeapRegion.regionSizeBytes()); + printValMB("used = ", sh.used()); + printValMB("committed = ", sh.committed()); } else if (heap instanceof EpsilonHeap) { EpsilonHeap eh = (EpsilonHeap) heap; printSpace(eh.space()); } else if (heap instanceof ZCollectedHeap) { ZCollectedHeap zheap = (ZCollectedHeap) heap;
*** 181,190 **** --- 194,211 ---- l = getFlagValue("ParallelGCThreads", flagMap); System.out.println("with " + l + " thread(s)"); return; } + l = getFlagValue("UseShenandoahGC", flagMap); + if (l == 1L) { + System.out.print("Shenandoah GC "); + l = getFlagValue("ParallelGCThreads", flagMap); + System.out.println("with " + l + " thread(s)"); + return; + } + System.out.println("Mark Sweep Compact GC"); } private void printPSYoungGen(PSYoungGen youngGen) { System.out.println("PS Young Generation");
< prev index next >