--- old/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1Allocator.java 2015-07-15 14:35:05.008910409 +0200 +++ /dev/null 2015-07-01 14:30:38.440775709 +0200 @@ -1,40 +0,0 @@ -package sun.jvm.hotspot.gc.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); - - } -}