< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/GenCollectedHeap.java

Print this page

        

@@ -26,10 +26,11 @@
 
 import java.io.*;
 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.*;
 
 abstract public class GenCollectedHeap extends CollectedHeap {

@@ -132,10 +133,18 @@
               VMObjectFactory.newObject(GenerationSpec.class,
                       oldGenSpecField.getAddress());
     }
   }
 
+  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 + ": ");
       getGen(i).printOn(tty);
       tty.println("Invocations: " + getGen(i).invocations());
< prev index next >