agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java

agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java

Print this page

        

*** 33,43 **** import sun.jvm.hotspot.types.*; import sun.jvm.hotspot.utilities.*; public class GenCollectedHeap extends SharedHeap { private static CIntegerField nGensField; ! private static long gensOffset; private static AddressField genSpecsField; private static GenerationFactory genFactory; static { --- 33,44 ---- import sun.jvm.hotspot.types.*; import sun.jvm.hotspot.utilities.*; public class GenCollectedHeap extends SharedHeap { private static CIntegerField nGensField; ! private static AddressField youngGenField; ! private static AddressField oldGenField; private static AddressField genSpecsField; private static GenerationFactory genFactory; static {
*** 50,60 **** private static synchronized void initialize(TypeDataBase db) { Type type = db.lookupType("GenCollectedHeap"); nGensField = type.getCIntegerField("_n_gens"); ! gensOffset = type.getField("_gens").getOffset(); genSpecsField = type.getAddressField("_gen_specs"); genFactory = new GenerationFactory(); } --- 51,62 ---- private static synchronized void initialize(TypeDataBase db) { Type type = db.lookupType("GenCollectedHeap"); nGensField = type.getCIntegerField("_n_gens"); ! youngGenField = type.getAddressField("_young_gen"); ! oldGenField = type.getAddressField("_old_gen"); genSpecsField = type.getAddressField("_gen_specs"); genFactory = new GenerationFactory(); }
*** 74,87 **** if ((i < 0) || (i >= nGens())) { return null; } ! Address genAddr = addr.getAddressAt(gensOffset + ! (i * VM.getVM().getAddressSize())); ! return genFactory.newObject(addr.getAddressAt(gensOffset + ! (i * VM.getVM().getAddressSize()))); } public boolean isIn(Address a) { for (int i = 0; i < nGens(); i++) { Generation gen = getGen(i); --- 76,90 ---- if ((i < 0) || (i >= nGens())) { return null; } ! if (i == 0) { ! return genFactory.newObject(youngGenField.getAddress()); ! } else { ! return genFactory.newObject(oldGenField.getAddress()); ! } } public boolean isIn(Address a) { for (int i = 0; i < nGens(); i++) { Generation gen = getGen(i);
agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File