public abstract class Simple extends Plan
This class defines the collection phases, and provides base level implementations of them. Subclasses should provide implementations for the spaces that they introduce, and delegate up the class hierarchy.
For details of the split between global and thread-local operations
Plan
Modifier and Type | Field and Description |
---|---|
static short |
CLOSURE |
short |
collection
This is the phase that is executed to perform a collection.
|
protected int |
collectionAttempt
The current collection attempt.
|
static short |
COMPLETE |
protected static short |
completeClosurePhase
Complete closure including reference types and finalizable objects.
|
static short |
FINALIZABLE |
private static Timer |
finalizeTime |
protected static short |
finishPhase
The collection scheme - this is a small tree of complex phases.
|
static short |
FORWARD |
static short |
FORWARD_FINALIZABLE |
static short |
FORWARD_REFS |
protected static short |
forwardPhase
Ensure that all references in the system are correct.
|
static short |
INITIATE |
protected static short |
initPhase
Start the collection, including preparation for any collected spaces.
|
static short |
PHANTOM_REFS |
static short |
POST_SANITY_PLACEHOLDER |
static short |
PRE_SANITY_PLACEHOLDER |
static short |
PREPARE |
static short |
PREPARE_STACKS |
protected static short |
prepareStacks
Ensure stacks are ready to be scanned
|
protected static short |
refTypeClosurePhase
Complete closure including reference types and finalizable objects.
|
private static Timer |
refTypeTime
Constants
|
static short |
RELEASE |
protected static short |
rootClosurePhase
Perform the initial determination of liveness from the roots.
|
static short |
ROOTS |
static short |
SANITY_BUILD_TABLE |
static short |
SANITY_CHECK_TABLE |
static short |
SANITY_COPY_ROOTS |
static short |
SANITY_PREPARE |
static short |
SANITY_RELEASE |
static short |
SANITY_ROOTS |
static short |
SANITY_SET_POSTGC |
static short |
SANITY_SET_PREGC |
protected static short |
sanityBuildPhase
Trace and set up a sanity table
|
protected static short |
sanityCheckPhase
Validate a sanity table
|
private static Timer |
scanTime |
static short |
SET_COLLECTION_KIND |
static short |
SOFT_REFS |
static short |
STACK_ROOTS |
static short |
WEAK_REFS |
static short |
WEAK_TRACK_REFS |
ALLOC_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 |
---|
Simple() |
Modifier and Type | Method and Description |
---|---|
void |
collectionPhase(short phaseId)
Perform a (global) collection phase.
|
void |
replacePhase(int oldScheduledPhase,
int newScheduledPhase)
Replace a phase.
|
void |
replacePlaceholderPhase(short placeHolderPhase,
int newScheduledPhase)
Replace a placeholder phase.
|
protected void |
switchNurseryZeroingApproach(Space nurserySpace)
Update the nursery zeroing approach based on option settings.
|
availableMemory, bootTimeWriteBarrier, collectionRequired, concurrentCollectionRequired, determineThreadCount, enableAllocation, enableCollection, forceFullHeapCollection, freeMemory, fullyBooted, gcInProgress, gcInProgressProper, getAllocationSite, getCollectionReserve, getPagesAvail, getPagesReserved, getPagesUsed, getSpecializedScanClass, getTotalPages, handleUserCollectionRequest, harnessBegin, harnessEnd, insertPhaseAfter, isCurrentGCNursery, isEmergencyCollection, isInitialized, isInternalTriggeredCollection, isUserTriggeredCollection, lastCollectionFullHeap, lastCollectionWasExhaustive, loadObjectReference, logPoll, notifyExit, poll, preCollectorSpawn, printDetailedTiming, printPostStats, printPreStats, printUsedPages, processOptions, registerSpecializedMethods, reservedMemory, resetCollectionTrigger, sanityExpectedRC, sanityLinearScan, setBuildTimeGCByte, setGCStatus, spawnCollectorThreads, stacksPrepared, startGCspyServer, storeObjectReference, stressTestGCRequired, totalMemory, triggerInternalCollectionRequest, usedMemory, willNeverMove
private static final Timer refTypeTime
private static final Timer finalizeTime
public static final short SET_COLLECTION_KIND
public static final short INITIATE
public static final short PREPARE
public static final short PREPARE_STACKS
public static final short STACK_ROOTS
public static final short ROOTS
public static final short CLOSURE
public static final short SOFT_REFS
public static final short WEAK_REFS
public static final short FINALIZABLE
public static final short WEAK_TRACK_REFS
public static final short PHANTOM_REFS
public static final short FORWARD
public static final short FORWARD_REFS
public static final short FORWARD_FINALIZABLE
public static final short RELEASE
public static final short COMPLETE
public static final short PRE_SANITY_PLACEHOLDER
public static final short POST_SANITY_PLACEHOLDER
public static final short SANITY_SET_PREGC
public static final short SANITY_SET_POSTGC
public static final short SANITY_PREPARE
public static final short SANITY_ROOTS
public static final short SANITY_COPY_ROOTS
public static final short SANITY_BUILD_TABLE
public static final short SANITY_CHECK_TABLE
public static final short SANITY_RELEASE
protected static final short prepareStacks
protected static final short sanityBuildPhase
protected static final short sanityCheckPhase
protected static final short initPhase
protected static final short rootClosurePhase
protected static final short refTypeClosurePhase
protected static final short forwardPhase
protected static final short completeClosurePhase
protected static final short finishPhase
public short collection
protected int collectionAttempt
public Simple()
public void collectionPhase(short phaseId)
collectionPhase
in class Plan
phaseId
- The unique id of the phase to perform.protected void switchNurseryZeroingApproach(Space nurserySpace)
nurserySpace
- The space to apply the changes to.public void replacePhase(int oldScheduledPhase, int newScheduledPhase)
replacePhase
in class Plan
oldScheduledPhase
- The scheduled phase to insert afternewScheduledPhase
- The scheduled phase to insertpublic void replacePlaceholderPhase(short placeHolderPhase, int newScheduledPhase)
placeHolderPhase
- The placeholder phasenewScheduledPhase
- The new scheduled phase.