|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mmtk.plan.Plan
org.mmtk.plan.Simple
org.mmtk.plan.StopTheWorld
org.mmtk.plan.generational.Gen
public abstract class Gen
This abstract class implements the core functionality of generic
two-generationa copying collectors. Nursery collections occur when
either the heap is full or the nursery is full. The nursery size
is determined by an optional command line argument. If undefined,
the nursery size is "infinite", so nursery collections only occur
when the heap is full (this is known as a flexible-sized nursery
collector). Thus both fixed and flexible nursery sizes are
supported. Full heap collections occur when the nursery size has
dropped to a statically defined threshold,
NURSERY_THRESHOLD
See also Plan.java for general comments on local vs global plan classes.
| Field Summary | |
|---|---|
static int |
ALLOC_MATURE
|
static int |
ALLOC_MATURE_MAJORGC
|
static int |
ALLOC_MATURE_MINORGC
|
static int |
ALLOC_NURSERY
|
SharedDeque |
arrayRemsetPool
|
protected static BooleanCounter |
fullHeap
Class fields |
private static Timer |
fullHeapTime
|
boolean |
gcFullHeap
Instance fields |
static boolean |
IGNORE_REMSETS
|
protected static float |
MATURE_FRACTION
|
SharedDeque |
modbufPool
Remset pools |
boolean |
nextGCFullHeap
|
static int |
NURSERY
|
private static Address |
NURSERY_START
|
protected static float |
NURSERY_VM_FRACTION
Fraction of available virtual memory to give to the nursery (if contiguous) |
static SizeCounter |
nurseryCons
|
static SizeCounter |
nurseryMark
|
static CopySpace |
nurserySpace
|
Trace |
nurseryTrace
|
SharedDeque |
remsetPool
|
static int |
SCAN_MATURE
|
static int |
SCAN_NURSERY
|
protected static float |
SURVIVAL_ESTIMATE
Constants |
(package private) static boolean |
USE_DISCONTIGUOUS_NURSERY
Switch between a contiguous and discontiguous nursery (experimental) |
static boolean |
USE_NON_HEAP_OBJECT_REFERENCE_WRITE_BARRIER
|
static boolean |
USE_OBJECT_BARRIER
|
static boolean |
USE_OBJECT_BARRIER_FOR_AASTORE
|
static boolean |
USE_OBJECT_BARRIER_FOR_PUTFIELD
|
private static VMRequest |
vmRequest
The nursery space is where all new objects are allocated by default |
protected static EventCounter |
wbFast
|
protected static EventCounter |
wbSlow
|
private static float |
WORST_CASE_COPY_EXPANSION
|
| Fields inherited from class org.mmtk.plan.StopTheWorld |
|---|
postSanityPhase, preSanityPhase |
| Constructor Summary | |
|---|---|
Gen()
|
|
| Method Summary | |
|---|---|
protected abstract Space |
activeMatureSpace()
|
void |
collectionPhase(short phaseId)
Perform a (global) collection phase. |
boolean |
collectionRequired(boolean spaceFull)
This method controls the triggering of a GC. |
protected boolean |
copyMature()
|
void |
forceFullHeapCollection()
Force the next collection to be full heap. |
int |
getCollectionReserve()
Return the number of pages reserved for copying. |
abstract int |
getMaturePhysicalPagesAvail()
Return the number of pages available for allocation into the mature space. |
int |
getPagesAvail()
Return the number of pages available for allocation, assuming all future allocation is to the nursery. |
int |
getPagesRequired()
Calculate the number of pages a collection is required to free to satisfy outstanding allocation requests. |
int |
getPagesUsed()
Return the number of pages in use given the pending allocation. |
(package private) static boolean |
inNursery(Address addr)
Return true if the address resides within the nursery |
(package private) static boolean |
inNursery(ObjectReference obj)
Return true if the object resides within the nursery |
boolean |
isCurrentGCNursery()
|
boolean |
lastCollectionFullHeap()
|
void |
printPreStats()
Print pre-collection statistics. |
protected void |
registerSpecializedMethods()
Register specialized methods. |
protected boolean |
requiresFullHeapCollection()
Determine if this GC should be a full heap collection. |
int |
sanityExpectedRC(ObjectReference object,
int sanityRootRC)
Return the expected reference count. |
boolean |
traceFullHeap()
|
private boolean |
virtualMemoryExhausted()
Independent of how many pages remain in the page budget (a function of heap size), we must ensure we never exhaust virtual memory. |
boolean |
willNeverMove(ObjectReference object)
Can this object ever move. |
| Methods inherited from class org.mmtk.plan.StopTheWorld |
|---|
postBoot |
| Methods inherited from class org.mmtk.plan.Simple |
|---|
replacePhase, replacePlaceholderPhase |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final float SURVIVAL_ESTIMATE
protected static final float MATURE_FRACTION
private static final float WORST_CASE_COPY_EXPANSION
public static final boolean IGNORE_REMSETS
public static final boolean USE_NON_HEAP_OBJECT_REFERENCE_WRITE_BARRIER
public static final boolean USE_OBJECT_BARRIER_FOR_AASTORE
public static final boolean USE_OBJECT_BARRIER_FOR_PUTFIELD
public static final boolean USE_OBJECT_BARRIER
protected static final float NURSERY_VM_FRACTION
static final boolean USE_DISCONTIGUOUS_NURSERY
public static final int ALLOC_NURSERY
public static final int ALLOC_MATURE
public static final int ALLOC_MATURE_MINORGC
public static final int ALLOC_MATURE_MAJORGC
public static final int SCAN_NURSERY
public static final int SCAN_MATURE
protected static final BooleanCounter fullHeap
private static final Timer fullHeapTime
protected static final EventCounter wbFast
protected static final EventCounter wbSlow
public static final SizeCounter nurseryMark
public static final SizeCounter nurseryCons
private static final VMRequest vmRequest
public static final CopySpace nurserySpace
public static final int NURSERY
private static final Address NURSERY_START
public boolean gcFullHeap
public boolean nextGCFullHeap
public final Trace nurseryTrace
public final SharedDeque modbufPool
public final SharedDeque remsetPool
public final SharedDeque arrayRemsetPool
| Constructor Detail |
|---|
public Gen()
| Method Detail |
|---|
public void forceFullHeapCollection()
forceFullHeapCollection in class Planpublic void collectionPhase(short phaseId)
collectionPhase in class SimplephaseId - Collection phase to execute.public final boolean collectionRequired(boolean spaceFull)
collectionRequired in class PlanspaceFull - Space request failed, must recover pages within 'space'.
protected boolean requiresFullHeapCollection()
private boolean virtualMemoryExhausted()
public int getPagesUsed()
getPagesUsed in class Planpublic int getPagesAvail()
getPagesAvail in class Planpublic int getCollectionReserve()
getCollectionReserve in class Planpublic abstract int getMaturePhysicalPagesAvail()
public int getPagesRequired()
getPagesRequired in class Planstatic boolean inNursery(Address addr)
addr - The object to be tested
static boolean inNursery(ObjectReference obj)
obj - The object to be tested
protected boolean copyMature()
public void printPreStats()
printPreStats in class Planprotected abstract Space activeMatureSpace()
Gen.public final boolean traceFullHeap()
public final boolean isCurrentGCNursery()
isCurrentGCNursery in class Planpublic final boolean lastCollectionFullHeap()
lastCollectionFullHeap in class Planpublic boolean willNeverMove(ObjectReference object)
Plan
willNeverMove in class Planobject - Object in question
Plan.willNeverMove(org.vmmagic.unboxed.ObjectReference)
public int sanityExpectedRC(ObjectReference object,
int sanityRootRC)
sanityExpectedRC in class Planobject - The object to check.sanityRootRC - The number of root references to the object.
protected void registerSpecializedMethods()
registerSpecializedMethods in class Plan
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||