src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
changeset 51741 ed9b1200dd81
parent 51554 5b0d86499960
child 52925 9c18c9d839d3
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java	Fri Sep 14 14:45:31 2018 +0200
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java	Fri Sep 14 14:44:11 2018 +0200
@@ -37,6 +37,7 @@
 import sun.jvm.hotspot.gc.epsilon.*;
 import sun.jvm.hotspot.gc.g1.*;
 import sun.jvm.hotspot.gc.parallel.*;
+import sun.jvm.hotspot.gc.z.*;
 import sun.jvm.hotspot.memory.*;
 import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.types.*;
@@ -366,6 +367,10 @@
     } else if (heap instanceof G1CollectedHeap) {
         G1CollectedHeap g1h = (G1CollectedHeap) heap;
         g1h.heapRegionIterate(lrc);
+    } else if (heap instanceof ZCollectedHeap) {
+       // Operation (currently) not supported with ZGC. Print
+       // a warning and leave the list of live regions empty.
+       System.err.println("Warning: Operation not supported with ZGC");
     } else if (heap instanceof EpsilonHeap) {
        EpsilonHeap eh = (EpsilonHeap) heap;
        liveRegions.add(eh.space().top());