--- old/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java 2018-06-08 19:45:41.831056130 +0200 +++ new/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java 2018-06-08 19:45:41.563044502 +0200 @@ -29,6 +29,7 @@ import sun.jvm.hotspot.gc.parallel.*; import sun.jvm.hotspot.gc.serial.*; 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.*; @@ -124,6 +125,9 @@ printValMB("used = ", oldGen.used()); printValMB("free = ", oldFree); System.out.println(alignment + (double)oldGen.used() * 100.0 / oldGen.capacity() + "% used"); + } else if (heap instanceof ZCollectedHeap) { + ZCollectedHeap zheap = (ZCollectedHeap) heap; + zheap.printOn(System.out); } else { throw new RuntimeException("unknown CollectedHeap type : " + heap.getClass()); } @@ -159,6 +163,14 @@ l = getFlagValue("ParallelGCThreads", flagMap); System.out.println("with " + l + " thread(s)"); return; + } + + l = getFlagValue("UseZGC", flagMap); + if (l == 1L) { + System.out.print("ZGC "); + l = getFlagValue("ParallelGCThreads", flagMap); + System.out.println("with " + l + " thread(s)"); + return; } System.out.println("Mark Sweep Compact GC");