public class StickyImmixMutator extends ImmixMutator
Specifically, this class defines MS mutator-time allocation and per-mutator thread collection semantics (flushing and restoring per-mutator allocator state).
*
StickyImmix
,
StickyImmixCollector
,
MutatorContext
,
Phase
Modifier and Type | Field and Description |
---|---|
private ObjectReferenceDeque |
modBuffer |
immix
Constructor and Description |
---|
StickyImmixMutator()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
assertRemsetFlushed() |
void |
collectionPhase(short phaseId,
boolean primary)
Perform a per-mutator collection phase.
|
void |
flushRememberedSets()
Flush per-mutator remembered sets into the global remset pool.
|
private static StickyImmix |
global() |
private void |
logSource(ObjectReference src)
Add an object to the modified objects buffer and mark the
object has having been logged.
|
boolean |
objectReferenceBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of references are about to be copied from object
src to object dst (as in an array
copy). |
boolean |
objectReferenceTryCompareAndSwap(ObjectReference src,
Address slot,
ObjectReference old,
ObjectReference tgt,
Word metaDataA,
Word metaDataB,
int mode)
Attempt to atomically exchange the value in the given slot
with the passed replacement value.
|
void |
objectReferenceWrite(ObjectReference src,
Address slot,
ObjectReference tgt,
Word metaDataA,
Word metaDataB,
int mode)
Write an object reference.
|
alloc, getAllocatorFromSpace, postAlloc
addressBulkCopy, addressRead, addressTryCompareAndSwap, addressWrite, assertRemsetsFlushed, booleanBulkCopy, booleanRead, booleanWrite, byteBulkCopy, byteRead, byteWrite, charBulkCopy, charRead, charWrite, checkAllocator, deinitMutator, doubleBulkCopy, doubleRead, doubleWrite, extentBulkCopy, extentRead, extentWrite, floatBulkCopy, floatRead, floatWrite, flush, getId, getLog, initMutator, intBulkCopy, intRead, intTryCompareAndSwap, intWrite, javaLangReferenceReadBarrier, longBulkCopy, longRead, longTryCompareAndSwap, longWrite, objectReferenceNonHeapRead, objectReferenceNonHeapWrite, objectReferenceRead, offsetBulkCopy, offsetRead, offsetWrite, shortBulkCopy, shortRead, shortWrite, wordBulkCopy, wordRead, wordTryCompareAndSwap, wordWrite
private final ObjectReferenceDeque modBuffer
public StickyImmixMutator()
public final void objectReferenceWrite(ObjectReference src, Address slot, ObjectReference tgt, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
In this case, we remember the address of the source of the pointer if the new reference points into the nursery from non-nursery space.
objectReferenceWrite
in class MutatorContext
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.tgt
- The value of the new referencemetaDataA
- A value that assists the host VM in creating a storemetaDataB
- A value that assists the host VM in creating a storemode
- The context in which the store occurredpublic final boolean objectReferenceBulkCopy(ObjectReference src, Offset srcOffset, ObjectReference dst, Offset dstOffset, int bytes)
src
to object dst
(as in an array
copy). Thus, dst
is the mutated object. Take
appropriate write barrier actions.In this case, we remember the mutated source address range and will scan that address range at GC time.
objectReferenceBulkCopy
in class MutatorContext
src
- The source of the values to copiedsrcOffset
- The offset of the first source address, in
bytes, relative to src
(in principle, this could be
negative).dst
- The mutated object, i.e. the destination of the copy.dstOffset
- The offset of the first destination address, in
bytes relative to tgt
(in principle, this could be
negative).bytes
- The size of the region being copied, in bytes.public boolean objectReferenceTryCompareAndSwap(ObjectReference src, Address slot, ObjectReference old, ObjectReference tgt, Word metaDataA, Word metaDataB, int mode)
MutatorContext
By default do nothing, override if appropriate.
objectReferenceTryCompareAndSwap
in class MutatorContext
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.old
- The old reference to be swapped outtgt
- The target of the new referencemetaDataA
- A value that assists the host VM in creating a storemetaDataB
- A value that assists the host VM in creating a storemode
- The context in which the store occurredprivate void logSource(ObjectReference src)
src
- The object to be loggedpublic final void flushRememberedSets()
MutatorContext
flushRememberedSets
in class MutatorContext
public final void assertRemsetFlushed()
public final void collectionPhase(short phaseId, boolean primary)
collectionPhase
in class ImmixMutator
phaseId
- The unique phase identifierprimary
- Should this thread be used to execute any single-threaded
local operations?private static StickyImmix global()
MSGen
instance.