< prev index next >

agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetBase.java

Print this page

        

*** 39,49 **** // Mirror class for HeapRegionSetBase. Represents a group of regions. public class HeapRegionSetBase extends VMObject { ! static private long countField; static { VM.registerVMInitializedObserver(new Observer() { public void update(Observable o, Object data) { initialize(VM.getVM().getTypeDataBase()); --- 39,50 ---- // Mirror class for HeapRegionSetBase. Represents a group of regions. public class HeapRegionSetBase extends VMObject { ! // uint _length ! static private CIntegerField lengthField; static { VM.registerVMInitializedObserver(new Observer() { public void update(Observable o, Object data) { initialize(VM.getVM().getTypeDataBase());
*** 52,68 **** } static private synchronized void initialize(TypeDataBase db) { Type type = db.lookupType("HeapRegionSetBase"); ! countField = type.getField("_count").getOffset(); } ! ! public HeapRegionSetCount count() { ! Address countFieldAddr = addr.addOffsetTo(countField); ! return (HeapRegionSetCount) VMObjectFactory.newObject(HeapRegionSetCount.class, countFieldAddr); } public HeapRegionSetBase(Address addr) { super(addr); } --- 53,67 ---- } static private synchronized void initialize(TypeDataBase db) { Type type = db.lookupType("HeapRegionSetBase"); ! lengthField = type.getCIntegerField("_length"); } ! public long length() { ! return lengthField.getValue(addr); } public HeapRegionSetBase(Address addr) { super(addr); }
< prev index next >