--- old/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1Allocator.java 2015-03-06 20:51:43.443422666 +0100 +++ /dev/null 2015-02-26 11:35:21.495574995 +0100 @@ -1,40 +0,0 @@ -package sun.jvm.hotspot.gc_implementation.g1; - -import java.util.Observable; -import java.util.Observer; - -import sun.jvm.hotspot.debugger.Address; -import sun.jvm.hotspot.runtime.VM; -import sun.jvm.hotspot.runtime.VMObject; -import sun.jvm.hotspot.types.CIntegerField; -import sun.jvm.hotspot.types.Type; -import sun.jvm.hotspot.types.TypeDataBase; - -public class G1Allocator extends VMObject { - - //size_t _summary_bytes_used; - static private CIntegerField summaryBytesUsedField; - - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - static private synchronized void initialize(TypeDataBase db) { - Type type = db.lookupType("G1Allocator"); - - summaryBytesUsedField = type.getCIntegerField("_summary_bytes_used"); - } - - public long getSummaryBytes() { - return summaryBytesUsedField.getValue(addr); - } - - public G1Allocator(Address addr) { - super(addr); - - } -}