--- old/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1Allocator.java 2015-05-12 11:35:53.426305217 +0200 +++ /dev/null 2015-03-18 17:10:38.111854831 +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); - - } -} --- /dev/null 2015-03-18 17:10:38.111854831 +0100 +++ new/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1Allocator.java 2015-05-12 11:35:53.196295637 +0200 @@ -0,0 +1,40 @@ +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); + + } +}