public abstract class Gen extends StopTheWorld
NURSERY_THRESHOLDSee also Plan.java for general comments on local vs global plan classes.
| Modifier and Type | Field and Description |
|---|---|
static int |
ALLOC_MATURE |
static int |
ALLOC_MATURE_MAJORGC |
static int |
ALLOC_MATURE_MINORGC |
static int |
ALLOC_NURSERY |
SharedDeque |
arrayRemsetPool |
protected static BooleanCounter |
fullHeap |
private static Timer |
fullHeapTime |
boolean |
gcFullHeap |
static boolean |
IGNORE_REMSETS |
protected static float |
MATURE_FRACTION |
SharedDeque |
modbufPool |
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 |
(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 |
protected static EventCounter |
wbFast |
protected static EventCounter |
wbSlow |
private static float |
WORST_CASE_COPY_EXPANSION |
postSanityPhase, preSanityPhaseCLOSURE, collection, collectionAttempt, COMPLETE, completeClosurePhase, FINALIZABLE, finishPhase, FORWARD, FORWARD_FINALIZABLE, FORWARD_REFS, forwardPhase, INITIATE, initPhase, PHANTOM_REFS, POST_SANITY_PLACEHOLDER, PRE_SANITY_PLACEHOLDER, PREPARE, PREPARE_STACKS, prepareStacks, refTypeClosurePhase, RELEASE, rootClosurePhase, ROOTS, SANITY_BUILD_TABLE, SANITY_CHECK_TABLE, SANITY_COPY_ROOTS, SANITY_PREPARE, SANITY_RELEASE, SANITY_ROOTS, SANITY_SET_POSTGC, SANITY_SET_PREGC, sanityBuildPhase, sanityCheckPhase, SET_COLLECTION_KIND, SOFT_REFS, STACK_ROOTS, WEAK_REFS, WEAK_TRACK_REFSALLOC_CODE, ALLOC_COLD_CODE, ALLOC_DEFAULT, ALLOC_GCSPY, ALLOC_HOT_CODE, ALLOC_IMMORTAL, ALLOC_LARGE_CODE, ALLOC_LOS, ALLOC_NON_MOVING, ALLOC_NON_REFERENCE, ALLOC_PRIMITIVE_LOS, ALLOC_STACK, allocationSiteCount, ALLOCATORS, concurrentWorkers, controlCollectorContext, DEFAULT_MAX_NURSERY, DEFAULT_MIN_NURSERY, DEFAULT_SITE, defaultCollectorContext, emergencyCollection, GATHER_WRITE_BARRIER_STATS, GC_PREPARE, GC_PROPER, IMMORTAL, immortalSpace, insideHarness, internalTriggeredCollection, LARGE_CODE, largeCodeSpace, lastInternalTriggeredCollection, LOS, loSpace, MAX_NON_LOS_COPY_BYTES, MAX_NON_LOS_DEFAULT_ALLOC_BYTES, MAX_NON_LOS_NONMOVING_ALLOC_BYTES, META, metaDataSpace, NEEDS_LOG_BIT_IN_HEADER, NON_MOVING, NON_PARTICIPANT, nonMovingSpace, NOT_IN_GC, parallelWorkers, pretenureThreshold, SANITY, sanityChecker, sanitySpace, SCAN_BOOT_IMAGE, SMALL_CODE, smallCodeSpace, stacksPrepared, totalTime, USE_CODE_SPACE, userTriggeredCollection, VM_SPACE, vmSpace| Constructor and Description |
|---|
Gen() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Space |
activeMatureSpace()
Accessor method to allow the generic generational code in Gen.java
to access the mature space.
|
void |
collectionPhase(short phaseId)
Perform a (global) collection phase.
|
boolean |
collectionRequired(boolean spaceFull,
Space space)
This method controls the triggering of a GC.
|
protected boolean |
copyMature() |
void |
forceFullHeapCollection()
Force the next collection to be full heap.
|
void |
fullyBooted() |
int |
getCollectionReserve()
Return the number of pages reserved for collection.
|
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 |
getPagesUsed()
Return the number of pages reserved for 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()
Registers 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.
|
processOptionsreplacePhase, replacePlaceholderPhase, switchNurseryZeroingApproachavailableMemory, bootTimeWriteBarrier, concurrentCollectionRequired, determineThreadCount, enableAllocation, enableCollection, freeMemory, gcInProgress, gcInProgressProper, getAllocationSite, getPagesReserved, getSpecializedScanClass, getTotalPages, handleUserCollectionRequest, harnessBegin, harnessEnd, insertPhaseAfter, isEmergencyCollection, isInitialized, isInternalTriggeredCollection, isUserTriggeredCollection, lastCollectionWasExhaustive, loadObjectReference, logPoll, notifyExit, poll, preCollectorSpawn, printDetailedTiming, printPostStats, printUsedPages, reservedMemory, resetCollectionTrigger, sanityLinearScan, setBuildTimeGCByte, setGCStatus, spawnCollectorThreads, stacksPrepared, startGCspyServer, storeObjectReference, stressTestGCRequired, totalMemory, triggerInternalCollectionRequest, usedMemoryprotected 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
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
public Gen()
public void forceFullHeapCollection()
forceFullHeapCollection in class Planpublic void collectionPhase(short phaseId)
SimplecollectionPhase in class SimplephaseId - The unique id of the phase to perform.public final boolean collectionRequired(boolean spaceFull, Space space)
Plantrue to trigger a collection.collectionRequired in class PlanspaceFull - Space request failed, must recover pages within 'space'.space - TODOtrue if a collection is requested by the plan.protected boolean requiresFullHeapCollection()
true is this GC should be a full heap collection.private boolean virtualMemoryExhausted()
true if the nursery has grown to the extent that it may not be
able to be copied into the mature space.public int getPagesUsed()
getPagesUsed in class Planpublic int getPagesAvail()
getPagesAvail in class Planpublic int getCollectionReserve()
getCollectionReserve in class Planpublic abstract int getMaturePhysicalPagesAvail()
static boolean inNursery(Address addr)
true if the address resides within the nurseryaddr - The object to be testedtrue if the address resides within the nurserystatic boolean inNursery(ObjectReference obj)
true if the object resides within the nurseryobj - The object to be testedtrue if the object resides within the nurseryprotected boolean copyMature()
public void printPreStats()
printPreStats in class Planprotected abstract Space activeMatureSpace()
Gen.public final boolean traceFullHeap()
true if we should trace the whole heap during collection. True if
we're ignoring remsets or if we're doing a full heap GC.public final boolean isCurrentGCNursery()
isCurrentGCNursery in class Planpublic final boolean lastCollectionFullHeap()
lastCollectionFullHeap in class Planpublic boolean willNeverMove(ObjectReference object)
PlanwillNeverMove in class Planobject - The object in questiontrue if it is not possible that the object will ever move.public int sanityExpectedRC(ObjectReference object, int sanityRootRC)
Plantrue/false relationship.sanityExpectedRC in class Planobject - The object to check.sanityRootRC - The number of root references to the object.protected void registerSpecializedMethods()
PlanregisterSpecializedMethods in class Planpublic void fullyBooted()
fullyBooted in class Plan