Handle SA Heap Summary better epsilon-gc-branch
authorshade
Tue, 05 Jun 2018 17:19:33 +0200
branchepsilon-gc-branch
changeset 56669 b20a56352d78
parent 56668 5cd17d3d3f83
child 56670 f26c4a196a15
Handle SA Heap Summary better
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");
    }