< prev index next > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shenandoah/ShenandoahHeap.java
Print this page
import sun.jvm.hotspot.utilities.Observable;
import sun.jvm.hotspot.utilities.Observer;
public class ShenandoahHeap extends CollectedHeap {
private static CIntegerField numRegions;
! private static CIntegerField used;
private static CIntegerField committed;
private static AddressField regions;
private static CIntegerField logMinObjAlignmentInBytes;
private static long regionPtrFieldSize;
import sun.jvm.hotspot.utilities.Observable;
import sun.jvm.hotspot.utilities.Observer;
public class ShenandoahHeap extends CollectedHeap {
private static CIntegerField numRegions;
! private static AddressField globalGeneration;
private static CIntegerField committed;
private static AddressField regions;
private static CIntegerField logMinObjAlignmentInBytes;
private static long regionPtrFieldSize;
}
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ShenandoahHeap");
numRegions = type.getCIntegerField("_num_regions");
! used = type.getCIntegerField("_used");
committed = type.getCIntegerField("_committed");
regions = type.getAddressField("_regions");
logMinObjAlignmentInBytes = type.getCIntegerField("_log_min_obj_alignment_in_bytes");
Type regionPtrType = db.lookupType("ShenandoahHeapRegion*");
}
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ShenandoahHeap");
numRegions = type.getCIntegerField("_num_regions");
! globalGeneration = type.getAddressField("_global_generation");
committed = type.getCIntegerField("_committed");
regions = type.getAddressField("_regions");
logMinObjAlignmentInBytes = type.getCIntegerField("_log_min_obj_alignment_in_bytes");
Type regionPtrType = db.lookupType("ShenandoahHeapRegion*");
return numOfRegions() * ShenandoahHeapRegion.regionSizeBytes();
}
@Override
public long used() {
! return used.getValue(addr);
}
public long committed() {
return committed.getValue(addr);
}
return numOfRegions() * ShenandoahHeapRegion.regionSizeBytes();
}
@Override
public long used() {
! Address globalGenerationAddress = globalGeneration.getValue(addr);
+ ShenandoahGeneration global = VMObjectFactory.newObject(ShenandoahGeneration.class, globalGenerationAddress);
+ return global.used();
}
public long committed() {
return committed.getValue(addr);
}
< prev index next >