public class GenMSMutator extends GenMutator
GenMS two-generational copying collector.
Specifically, this class defines mutator-time semantics specific to the
mature generation (GenMutator defines nursery semantics).
In particular the mature space allocator is defined (for mutator-time
allocation into the mature space via pre-tenuring), and the mature space
per-mutator thread collection time semantics are defined (rebinding
the mature space allocator).
See GenMS for a description of the GenMS algorithm.
GenMS,
GenMSCollector,
GenMutator,
StopTheWorldMutator,
MutatorContext| Modifier and Type | Field and Description |
|---|---|
private MarkSweepLocal |
mature
The allocator for the mark-sweep mature space (the mutator may
"pretenure" objects into this space which is otherwise used
only by the collector)
|
arrayRemset, nursery, remset| Constructor and Description |
|---|
GenMSMutator()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Address |
alloc(int bytes,
int align,
int offset,
int allocator,
int site)
Allocate memory for an object.
|
void |
collectionPhase(short phaseId,
boolean primary)
Perform a per-mutator collection phase.
|
void |
flush()
Flush mutator context, in response to a requestMutatorFlush.
|
Allocator |
getAllocatorFromSpace(Space space)
Return the allocator instance associated with a space
space, for this plan instance. |
private static GenMS |
global() |
void |
postAlloc(ObjectReference ref,
ObjectReference typeRef,
int bytes,
int allocator)
Perform post-allocation actions.
|
assertRemsetsFlushed, flushRememberedSets, objectReferenceBulkCopy, objectReferenceNonHeapWrite, objectReferenceTryCompareAndSwap, objectReferenceWriteaddressBulkCopy, addressRead, addressTryCompareAndSwap, addressWrite, booleanBulkCopy, booleanRead, booleanWrite, byteBulkCopy, byteRead, byteWrite, charBulkCopy, charRead, charWrite, checkAllocator, deinitMutator, doubleBulkCopy, doubleRead, doubleWrite, extentBulkCopy, extentRead, extentWrite, floatBulkCopy, floatRead, floatWrite, getId, getLog, initMutator, intBulkCopy, intRead, intTryCompareAndSwap, intWrite, javaLangReferenceReadBarrier, longBulkCopy, longRead, longTryCompareAndSwap, longWrite, objectReferenceNonHeapRead, objectReferenceRead, offsetBulkCopy, offsetRead, offsetWrite, shortBulkCopy, shortRead, shortWrite, wordBulkCopy, wordRead, wordTryCompareAndSwap, wordWriteprivate final MarkSweepLocal mature
public GenMSMutator()
public final Address alloc(int bytes, int align, int offset, int allocator, int site)
alloc in class GenMutatorbytes - The number of bytes required for the object.align - Required alignment for the object.offset - Offset associated with the alignment.allocator - The allocator associated with this request.site - Allocation sitepublic final void postAlloc(ObjectReference ref, ObjectReference typeRef, int bytes, int allocator)
MutatorContextpostAlloc in class GenMutatorref - The newly allocated objecttypeRef - the type reference for the instance being createdbytes - The size of the space to be allocated (in bytes)allocator - The allocator number to be used for this allocationpublic Allocator getAllocatorFromSpace(Space space)
MutatorContextspace, for this plan instance.getAllocatorFromSpace in class GenMutatorspace - The space for which the allocator instance is desired.space, or null
if no appropriate allocator can be established.public void collectionPhase(short phaseId, boolean primary)
collectionPhase in class GenMutatorphaseId - The unique phase identifierprimary - Should this thread be used to execute any single-threaded
local operations?public void flush()
MutatorContextflush in class MutatorContext