< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/GenCollectedHeap.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -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 >