agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java	Tue Feb 11 11:34:03 2014
--- new/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java	Tue Feb 11 11:34:03 2014

*** 38,53 **** --- 38,49 ---- import sun.jvm.hotspot.types.TypeDataBase; // Mirror class for HeapRegionSetBase. Represents a group of regions. public class HeapRegionSetBase extends VMObject { // uint _length; ! static private CIntegerField lengthField; // uint _region_num; static private CIntegerField regionNumField; // size_t _total_used_bytes; static private CIntegerField totalUsedBytesField; + ! static private long countField; static { VM.registerVMInitializedObserver(new Observer() { public void update(Observable o, Object data) { initialize(VM.getVM().getTypeDataBase());
*** 56,80 **** --- 52,69 ---- } static private synchronized void initialize(TypeDataBase db) { Type type = db.lookupType("HeapRegionSetBase"); ! lengthField = type.getCIntegerField("_length"); regionNumField = type.getCIntegerField("_region_num"); totalUsedBytesField = type.getCIntegerField("_total_used_bytes"); } public long length() { return lengthField.getValue(addr); ! countField = type.getField("_count").getOffset(); } public long regionNum() { return regionNumField.getValue(addr); } ! public long totalUsedBytes() { ! return totalUsedBytesField.getValue(addr); ! public HeapRegionSetCount count() { ! Address countFieldAddr = addr.addOffsetTo(countField); + return (HeapRegionSetCount) VMObjectFactory.newObject(HeapRegionSetCount.class, + countFieldAddr); } public HeapRegionSetBase(Address addr) { super(addr); }

agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File