--- old/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/GenCollectedHeap.java 2019-02-13 16:34:59.446271458 +0100 +++ new/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/GenCollectedHeap.java 2019-02-13 16:34:59.062271471 +0100 @@ -28,6 +28,7 @@ import java.util.*; import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.gc.shared.*; import sun.jvm.hotspot.runtime.*; import sun.jvm.hotspot.types.*; import sun.jvm.hotspot.utilities.*; @@ -134,6 +135,14 @@ } } + public void liveRegionsIterate(LiveRegionsClosure closure) { + // Run through all generations, obtaining bottom-top pairs. + for (int i = 0; i < nGens(); i++) { + Generation gen = getGen(i); + gen.liveRegionsIterate(closure); + } + } + public void printOn(PrintStream tty) { for (int i = 0; i < nGens(); i++) { tty.print("Gen " + i + ": ");