< prev index next >
agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetBase.java
Print this page
@@ -39,11 +39,12 @@
// Mirror class for HeapRegionSetBase. Represents a group of regions.
public class HeapRegionSetBase extends VMObject {
- static private long countField;
+ // uint _length
+ static private CIntegerField lengthField;
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
@@ -52,17 +53,15 @@
}
static private synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("HeapRegionSetBase");
- countField = type.getField("_count").getOffset();
+ lengthField = type.getCIntegerField("_length");
}
-
- public HeapRegionSetCount count() {
- Address countFieldAddr = addr.addOffsetTo(countField);
- return (HeapRegionSetCount) VMObjectFactory.newObject(HeapRegionSetCount.class, countFieldAddr);
+ public long length() {
+ return lengthField.getValue(addr);
}
public HeapRegionSetBase(Address addr) {
super(addr);
}
< prev index next >