--- old/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shenandoah/ShenandoahHeap.java 2019-02-15 20:10:28.243531909 +0100 +++ new/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shenandoah/ShenandoahHeap.java 2019-02-15 20:10:27.659531914 +0100 @@ -25,6 +25,7 @@ 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; @@ -64,6 +65,11 @@ } @Override + public long capacity() { + return numOfRegions() * ShenandoahHeapRegion.regionSizeBytes(); + } + + @Override public long used() { return used.getValue(addr); } @@ -73,6 +79,12 @@ } @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");