public abstract class ConcurrentMutator extends SimpleMutator
Concurrent,
ConcurrentCollector,
StopTheWorldMutator,
MutatorContext| Modifier and Type | Field and Description |
|---|---|
protected boolean |
barrierActive |
static boolean |
newMutatorBarrierActive |
| Modifier | Constructor and Description |
|---|---|
protected |
ConcurrentMutator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
checkAndEnqueueReference(ObjectReference ref)
Process a reference that may require being enqueued as part of a concurrent
collection.
|
void |
collectionPhase(short phaseId,
boolean primary)
Perform a per-mutator collection phase.
|
ObjectReference |
javaLangReferenceReadBarrier(ObjectReference ref)
Read a reference type.
|
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.
|
addressBulkCopy, addressRead, addressTryCompareAndSwap, addressWrite, alloc, assertRemsetsFlushed, booleanBulkCopy, booleanRead, booleanWrite, byteBulkCopy, byteRead, byteWrite, charBulkCopy, charRead, charWrite, checkAllocator, deinitMutator, doubleBulkCopy, doubleRead, doubleWrite, extentBulkCopy, extentRead, extentWrite, floatBulkCopy, floatRead, floatWrite, flush, flushRememberedSets, getAllocatorFromSpace, getId, getLog, initMutator, intBulkCopy, intRead, intTryCompareAndSwap, intWrite, longBulkCopy, longRead, longTryCompareAndSwap, longWrite, objectReferenceNonHeapRead, objectReferenceNonHeapWrite, objectReferenceRead, offsetBulkCopy, offsetRead, offsetWrite, postAlloc, shortBulkCopy, shortRead, shortWrite, wordBulkCopy, wordRead, wordTryCompareAndSwap, wordWritepublic static boolean newMutatorBarrierActive
protected volatile boolean barrierActive
protected ConcurrentMutator()
public void collectionPhase(short phaseId, boolean primary)
collectionPhase in class SimpleMutatorphaseId - The unique phase identifierprimary - Should this thread be used to execute any single-threaded
local operations?public 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 employ a Yuasa style snapshot barrier.
objectReferenceWrite in class MutatorContextsrc - 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 boolean objectReferenceTryCompareAndSwap(ObjectReference src, Address slot, ObjectReference old, ObjectReference tgt, Word metaDataA, Word metaDataB, int mode)
MutatorContextBy default do nothing, override if appropriate.
objectReferenceTryCompareAndSwap in class MutatorContextsrc - 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 occurredpublic 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.objectReferenceBulkCopy in class MutatorContextsrc - The source of the values to be 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.true if the update was performed by the barrier, false if
left to the caller (always false in this case).public ObjectReference javaLangReferenceReadBarrier(ObjectReference ref)
MutatorContextjavaLangReferenceReadBarrier in class MutatorContextref - The referent being read.protected abstract void checkAndEnqueueReference(ObjectReference ref)
ref - The reference to check.