< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shenandoah/ShenandoahHeap.java

Print this page

        

@@ -23,10 +23,11 @@
 
 package sun.jvm.hotspot.gc.shenandoah;
 
 import sun.jvm.hotspot.gc.shared.CollectedHeap;
 import sun.jvm.hotspot.gc.shared.CollectedHeapName;
+import sun.jvm.hotspot.gc.shared.LiveRegionsClosure;
 import sun.jvm.hotspot.debugger.Address;
 import sun.jvm.hotspot.runtime.VM;
 import sun.jvm.hotspot.types.Type;
 import sun.jvm.hotspot.types.TypeDataBase;
 import sun.jvm.hotspot.memory.MemRegion;

@@ -62,19 +63,30 @@
     public long numOfRegions() {
         return numRegions.getValue(addr);
     }
 
     @Override
+    public long capacity() {
+        return numOfRegions() * ShenandoahHeapRegion.regionSizeBytes();
+    }
+
+    @Override
     public long used() {
         return used.getValue(addr);
     }
 
     public long committed() {
         return committed.getValue(addr);
     }
 
     @Override
+    public void liveRegionsIterate(LiveRegionsClosure closure) {
+        // Operation (currently) not supported with Shenandoah GC.
+        System.err.println("Warning: Operation not supported with Shenandoah GC");
+    }
+
+    @Override
     public void printOn(PrintStream tty) {
         MemRegion mr = reservedRegion();
         tty.print("Shenandoah heap");
         tty.print(" [" + mr.start() + ", " + mr.end() + "]");
         tty.println(" region size " + ShenandoahHeapRegion.regionSizeBytes() / 1024 + " K");
< prev index next >