< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZCollectedHeap.java
Print this page
*** 23,47 ****
*/
package sun.jvm.hotspot.gc.z;
import java.io.PrintStream;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.gc.shared.CollectedHeap;
import sun.jvm.hotspot.gc.shared.CollectedHeapName;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VMObjectFactory;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.utilities.BitMapInterface;
// Mirror class for ZCollectedHeap.
public class ZCollectedHeap extends CollectedHeap {
-
private static long zHeapFieldOffset;
static {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
--- 23,48 ----
*/
package sun.jvm.hotspot.gc.z;
import java.io.PrintStream;
+ import java.util.Iterator;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.OopHandle;
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.runtime.VM;
import sun.jvm.hotspot.runtime.VMObjectFactory;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.utilities.BitMapInterface;
// Mirror class for ZCollectedHeap.
public class ZCollectedHeap extends CollectedHeap {
private static long zHeapFieldOffset;
static {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
*** 118,127 ****
--- 119,137 ----
return handle.toString();
}
}
@Override
+ public void liveRegionsIterate(LiveRegionsClosure closure) {
+ Iterator<ZPage> iter = heap().pageTable().activePagesIterator();
+ while (iter.hasNext()) {
+ ZPage page = iter.next();
+ closure.doLiveRegions(page);
+ }
+ }
+
+ @Override
public BitMapInterface createBitMap(long size) {
// Ignores the size
return new ZExternalBitMap(this);
}
}
< prev index next >