< prev index next >

agent/src/share/classes/sun/jvm/hotspot/gc/shared/Generation.java

Print this page

        

*** 47,57 **** public abstract class Generation extends VMObject { private static long reservedFieldOffset; private static long virtualSpaceFieldOffset; - private static CIntegerField levelField; protected static final int K = 1024; // Fields for class StatRecord private static Field statRecordField; private static CIntegerField invocationField; --- 47,56 ----
*** 73,83 **** private static synchronized void initialize(TypeDataBase db) { Type type = db.lookupType("Generation"); reservedFieldOffset = type.getField("_reserved").getOffset(); virtualSpaceFieldOffset = type.getField("_virtual_space").getOffset(); - levelField = type.getCIntegerField("_level"); // StatRecord statRecordField = type.getField("_stat_record"); type = db.lookupType("Generation::StatRecord"); invocationField = type.getCIntegerField("invocations"); --- 72,81 ----
*** 128,145 **** } else { throw new RuntimeException("should not reach here"); } } - public GenerationSpec spec() { - return ((GenCollectedHeap) VM.getVM().getUniverse().heap()).spec(level()); - } - - public int level() { - return (int) levelField.getValue(addr); - } - public int invocations() { return getStatRecord().getInvocations(); } /** The maximum number of object bytes the generation can currently --- 126,135 ----
< prev index next >