# HG changeset patch # User shade # Date 1528211973 -7200 # Node ID b20a56352d7857ee91c56d62616f0793580d91c9 # Parent 5cd17d3d3f83a965a74327ba0adb649df96fd443 Handle SA Heap Summary better diff -r 5cd17d3d3f83 -r b20a56352d78 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java Tue Jun 05 17:17:24 2018 +0200 +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java Tue Jun 05 17:19:33 2018 +0200 @@ -25,6 +25,7 @@ package sun.jvm.hotspot.tools; 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.*; @@ -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 EpsilonHeap) { + EpsilonHeap eh = (EpsilonHeap) heap; + printSpace(eh.space()); } else { throw new RuntimeException("unknown CollectedHeap type : " + heap.getClass()); } @@ -162,6 +166,12 @@ return; } + l = getFlagValue("UseEpsilonGC", flagMap); + if (l == 1L) { + System.out.println("Epsilon (no-op) GC"); + return; + } + System.out.println("Mark Sweep Compact GC"); }