agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1CollectedHeap.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-gc9 Sdiff agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1

agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1CollectedHeap.java

Print this page




  34 import sun.jvm.hotspot.memory.SharedHeap;
  35 import sun.jvm.hotspot.memory.SpaceClosure;
  36 import sun.jvm.hotspot.runtime.VM;
  37 import sun.jvm.hotspot.runtime.VMObjectFactory;
  38 import sun.jvm.hotspot.types.AddressField;
  39 import sun.jvm.hotspot.types.CIntegerField;
  40 import sun.jvm.hotspot.types.Type;
  41 import sun.jvm.hotspot.types.TypeDataBase;
  42 
  43 // Mirror class for G1CollectedHeap.
  44 
  45 public class G1CollectedHeap extends SharedHeap {
  46     // HeapRegionSeq _seq;
  47     static private long hrsFieldOffset;
  48     // MemRegion _g1_committed;
  49     static private long g1CommittedFieldOffset;
  50     // size_t _summary_bytes_used;
  51     static private CIntegerField summaryBytesUsedField;
  52     // G1MonitoringSupport* _g1mm;
  53     static private AddressField g1mmField;
  54     // OldRegionSet _old_set;
  55     static private long oldSetFieldOffset;
  56     // HumongousRegionSet _humongous_set;
  57     static private long humongousSetFieldOffset;
  58 
  59     static {
  60         VM.registerVMInitializedObserver(new Observer() {
  61                 public void update(Observable o, Object data) {
  62                     initialize(VM.getVM().getTypeDataBase());
  63                 }
  64             });
  65     }
  66 
  67     static private synchronized void initialize(TypeDataBase db) {
  68         Type type = db.lookupType("G1CollectedHeap");
  69 
  70         hrsFieldOffset = type.getField("_hrs").getOffset();
  71         g1CommittedFieldOffset = type.getField("_g1_committed").getOffset();
  72         summaryBytesUsedField = type.getCIntegerField("_summary_bytes_used");
  73         g1mmField = type.getAddressField("_g1mm");
  74         oldSetFieldOffset = type.getField("_old_set").getOffset();
  75         humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
  76     }




  34 import sun.jvm.hotspot.memory.SharedHeap;
  35 import sun.jvm.hotspot.memory.SpaceClosure;
  36 import sun.jvm.hotspot.runtime.VM;
  37 import sun.jvm.hotspot.runtime.VMObjectFactory;
  38 import sun.jvm.hotspot.types.AddressField;
  39 import sun.jvm.hotspot.types.CIntegerField;
  40 import sun.jvm.hotspot.types.Type;
  41 import sun.jvm.hotspot.types.TypeDataBase;
  42 
  43 // Mirror class for G1CollectedHeap.
  44 
  45 public class G1CollectedHeap extends SharedHeap {
  46     // HeapRegionSeq _seq;
  47     static private long hrsFieldOffset;
  48     // MemRegion _g1_committed;
  49     static private long g1CommittedFieldOffset;
  50     // size_t _summary_bytes_used;
  51     static private CIntegerField summaryBytesUsedField;
  52     // G1MonitoringSupport* _g1mm;
  53     static private AddressField g1mmField;
  54     // HeapRegionSet _old_set;
  55     static private long oldSetFieldOffset;
  56     // HeapRegionSet _humongous_set;
  57     static private long humongousSetFieldOffset;
  58 
  59     static {
  60         VM.registerVMInitializedObserver(new Observer() {
  61                 public void update(Observable o, Object data) {
  62                     initialize(VM.getVM().getTypeDataBase());
  63                 }
  64             });
  65     }
  66 
  67     static private synchronized void initialize(TypeDataBase db) {
  68         Type type = db.lookupType("G1CollectedHeap");
  69 
  70         hrsFieldOffset = type.getField("_hrs").getOffset();
  71         g1CommittedFieldOffset = type.getField("_g1_committed").getOffset();
  72         summaryBytesUsedField = type.getCIntegerField("_summary_bytes_used");
  73         g1mmField = type.getAddressField("_g1mm");
  74         oldSetFieldOffset = type.getField("_old_set").getOffset();
  75         humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
  76     }


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