public abstract class MutatorContext extends Object
MMTk assumes that the VM instantiates instances of MutatorContext in thread local storage (TLS) for each thread participating in collection. Accesses to this state are therefore assumed to be low-cost during mutator time.
This class (and its children) is therefore used for unsynchronized per-mutator operations such as allocation and write barriers. The semantics and necessary state for these operations are therefore specified in the GC-specific subclasses of this class. MMTk explicitly separates thread-local (this class) and global operations (@see Plan), so that syncrhonization is localized and explicit, and thus hopefully minimized (@see Plan). Gloabl (Plan) and per-thread (this class) state are also explicitly separated. Operations in this class (and its children) are therefore strictly local to each mutator thread, and synchronized operations always happen via access to explicitly global classes such as Plan and its children. Therefore only "fast path" (unsynchronized) allocation and barrier semantics are defined in MutatorContext and its subclasses. These call out to "slow path" (synchronize(d) methods which have global state and are globally synchronized. For example, an allocation fast path may bump a pointer without any syncrhonization (the "fast path") until a limit is reached, at which point the "slow path" is called, and more memory is aquired from a global resource.
As the super-class of all per-mutator contexts, this class implements basic per-mutator behavior common to all MMTk collectors, including support for immortal and large object space allocation, as well as empty stubs for write barriers (to be overridden by sub-classes as needed).
CollectorContext
,
ActivePlan
,
Plan
Modifier and Type | Field and Description |
---|---|
private int |
id
Unique mutator identifier
|
protected BumpPointer |
immortal
Per-mutator allocator into the immortal space
|
protected LargeObjectLocal |
lgcode
Per-mutator allocator into the large code space
|
protected Log |
log
Used for printing log information in a thread safe manner
|
protected LargeObjectLocal |
los
Per-mutator allocator into the large object space
|
protected MarkSweepLocal |
nonmove
Per-mutator allocator into the non moving space
|
protected MarkSweepLocal |
smcode
Per-mutator allocator into the small code space
|
Constructor and Description |
---|
MutatorContext() |
Modifier and Type | Method and Description |
---|---|
boolean |
addressBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of Addresse's are about to be copied from object
src to object dst (as in an array
copy). |
Address |
addressRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read an Address.
|
boolean |
addressTryCompareAndSwap(ObjectReference src,
Address slot,
Address old,
Address value,
Word metaDataA,
Word metaDataB,
int mode)
Attempt to atomically exchange the value in the given slot
with the passed replacement value.
|
void |
addressWrite(ObjectReference src,
Address slot,
Address value,
Word metaDataA,
Word metaDataB,
int mode)
Write an Address.
|
Address |
alloc(int bytes,
int align,
int offset,
int allocator,
int site)
Allocate memory for an object.
|
void |
assertRemsetsFlushed()
Assert that the remsets have been flushed.
|
boolean |
booleanBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of booleans are about to be copied from object
src to object dst (as in an array
copy). |
boolean |
booleanRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read a boolean.
|
void |
booleanWrite(ObjectReference src,
Address slot,
boolean value,
Word metaDataA,
Word metaDataB,
int mode)
Write a boolean.
|
boolean |
byteBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of bytes are about to be copied from object
src to object dst (as in an array
copy). |
byte |
byteRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read a byte.
|
void |
byteWrite(ObjectReference src,
Address slot,
byte value,
Word metaDataA,
Word metaDataB,
int mode)
Write a byte.
|
boolean |
charBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of chars are about to be copied from object
src to object dst (as in an array
copy). |
char |
charRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read a char.
|
void |
charWrite(ObjectReference src,
Address slot,
char value,
Word metaDataA,
Word metaDataB,
int mode)
Write a char.
|
int |
checkAllocator(int bytes,
int align,
int allocator)
Run-time check of the allocator to use for a given allocation
At the moment this method assumes that allocators will use the simple
(worst) method of aligning to determine if the object is a large object
to ensure that no objects are larger than other allocators can handle.
|
abstract void |
collectionPhase(short phaseId,
boolean primary)
Perform a per-mutator collection phase.
|
void |
deinitMutator()
The mutator is about to be cleaned up, make sure all local data is returned.
|
boolean |
doubleBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of doubles are about to be copied from object
src to object dst (as in an array
copy). |
double |
doubleRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read a double.
|
void |
doubleWrite(ObjectReference src,
Address slot,
double value,
Word metaDataA,
Word metaDataB,
int mode)
Write a double.
|
boolean |
extentBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of Extents are about to be copied from object
src to object dst (as in an array
copy). |
Extent |
extentRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read an Extent.
|
void |
extentWrite(ObjectReference src,
Address slot,
Extent value,
Word metaDataA,
Word metaDataB,
int mode)
Write an Extent.
|
boolean |
floatBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of floats are about to be copied from object
src to object dst (as in an array
copy). |
float |
floatRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read a float.
|
void |
floatWrite(ObjectReference src,
Address slot,
float value,
Word metaDataA,
Word metaDataB,
int mode)
Write a float.
|
void |
flush()
Flush mutator context, in response to a requestMutatorFlush.
|
void |
flushRememberedSets()
Flush per-mutator remembered sets into the global remset pool.
|
Allocator |
getAllocatorFromSpace(Space space)
Return the allocator instance associated with a space
space , for this plan instance. |
int |
getId() |
Log |
getLog() |
void |
initMutator(int id)
Notify that the mutator context is registered and ready to execute.
|
boolean |
intBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of ints are about to be copied from object
src to object dst (as in an array
copy). |
int |
intRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read a int.
|
boolean |
intTryCompareAndSwap(ObjectReference src,
Address slot,
int old,
int value,
Word metaDataA,
Word metaDataB,
int mode)
Attempt to atomically exchange the value in the given slot
with the passed replacement value.
|
void |
intWrite(ObjectReference src,
Address slot,
int value,
Word metaDataA,
Word metaDataB,
int mode)
Write a int.
|
ObjectReference |
javaLangReferenceReadBarrier(ObjectReference referent)
Read a reference type.
|
boolean |
longBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of longs are about to be copied from object
src to object dst (as in an array
copy). |
long |
longRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read a long.
|
boolean |
longTryCompareAndSwap(ObjectReference src,
Address slot,
long old,
long value,
Word metaDataA,
Word metaDataB,
int mode)
Attempt to atomically exchange the value in the given slot
with the passed replacement value.
|
void |
longWrite(ObjectReference src,
Address slot,
long value,
Word metaDataA,
Word metaDataB,
int mode)
Write a long.
|
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). |
ObjectReference |
objectReferenceNonHeapRead(Address slot,
Word metaDataA,
Word metaDataB)
Read an object reference.
|
void |
objectReferenceNonHeapWrite(Address slot,
ObjectReference tgt,
Word metaDataA,
Word metaDataB)
A new reference is about to be created in a location that is not
a regular heap object.
|
ObjectReference |
objectReferenceRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read an object reference.
|
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 value,
Word metaDataA,
Word metaDataB,
int mode)
Write an object reference.
|
boolean |
offsetBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of Offsets are about to be copied from object
src to object dst (as in an array
copy). |
Offset |
offsetRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read an Offset.
|
void |
offsetWrite(ObjectReference src,
Address slot,
Offset value,
Word metaDataA,
Word metaDataB,
int mode)
Write an Offset.
|
void |
postAlloc(ObjectReference ref,
ObjectReference typeRef,
int bytes,
int allocator)
Perform post-allocation actions.
|
boolean |
shortBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of shorts are about to be copied from object
src to object dst (as in an array
copy). |
short |
shortRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read a short.
|
void |
shortWrite(ObjectReference src,
Address slot,
short value,
Word metaDataA,
Word metaDataB,
int mode)
Write a short.
|
boolean |
wordBulkCopy(ObjectReference src,
Offset srcOffset,
ObjectReference dst,
Offset dstOffset,
int bytes)
A number of Words are about to be copied from object
src to object dst (as in an array
copy). |
Word |
wordRead(ObjectReference src,
Address slot,
Word metaDataA,
Word metaDataB,
int mode)
Read a Word.
|
boolean |
wordTryCompareAndSwap(ObjectReference src,
Address slot,
Word old,
Word value,
Word metaDataA,
Word metaDataB,
int mode)
Attempt to atomically exchange the value in the given slot
with the passed replacement value.
|
void |
wordWrite(ObjectReference src,
Address slot,
Word value,
Word metaDataA,
Word metaDataB,
int mode)
Write a Word.
|
private int id
protected final BumpPointer immortal
protected final LargeObjectLocal los
protected final MarkSweepLocal smcode
protected final LargeObjectLocal lgcode
protected final MarkSweepLocal nonmove
public MutatorContext()
public void initMutator(int id)
id
- The id of this mutator context.public void deinitMutator()
public abstract void collectionPhase(short phaseId, boolean primary)
phaseId
- The unique phase identifierprimary
- Should this thread be used to execute any single-threaded
local operations?public int checkAllocator(int bytes, int align, int allocator)
At the moment this method assumes that allocators will use the simple (worst) method of aligning to determine if the object is a large object to ensure that no objects are larger than other allocators can handle.
bytes
- The number of bytes to be allocatedalign
- The requested alignment.allocator
- The allocator statically assigned to this allocationpublic Address alloc(int bytes, int align, int offset, int allocator, int site)
bytes
- 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 void postAlloc(ObjectReference ref, ObjectReference typeRef, int bytes, int allocator)
ref
- 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)
space
, for this plan instance.space
- The space for which the allocator instance is desired.space
, or null
if no appropriate allocator can be established.public ObjectReference javaLangReferenceReadBarrier(ObjectReference referent)
referent
- The referent being read.public void booleanWrite(ObjectReference src, Address slot, boolean value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new booleanmetaDataA
- 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 booleanRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean booleanBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic void byteWrite(ObjectReference src, Address slot, byte value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new bytemetaDataA
- 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 byte byteRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean byteBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic void charWrite(ObjectReference src, Address slot, char value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new charmetaDataA
- 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 char charRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean charBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic void shortWrite(ObjectReference src, Address slot, short value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new shortmetaDataA
- 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 short shortRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean shortBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic void intWrite(ObjectReference src, Address slot, int value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new intmetaDataA
- 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 int intRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean intBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic boolean intTryCompareAndSwap(ObjectReference src, Address slot, int old, int value, Word metaDataA, Word metaDataB, int mode)
src
- The object into which the value will be storedslot
- The address into which the value will be
stored.old
- The old int to be swapped outvalue
- The new intmetaDataA
- 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 void longWrite(ObjectReference src, Address slot, long value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new longmetaDataA
- 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 long longRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean longBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic boolean longTryCompareAndSwap(ObjectReference src, Address slot, long old, long value, Word metaDataA, Word metaDataB, int mode)
src
- The object into which the value will be storedslot
- The address into which the value will be
stored.old
- The old long to be swapped outvalue
- The new longmetaDataA
- 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 void floatWrite(ObjectReference src, Address slot, float value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new floatmetaDataA
- 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 float floatRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean floatBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic void doubleWrite(ObjectReference src, Address slot, double value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new doublemetaDataA
- 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 double doubleRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean doubleBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic void wordWrite(ObjectReference src, Address slot, Word value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new WordmetaDataA
- 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 Word wordRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean wordBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic boolean wordTryCompareAndSwap(ObjectReference src, Address slot, Word old, Word value, Word metaDataA, Word metaDataB, int mode)
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.old
- The old Word to be swapped outvalue
- The new WordmetaDataA
- 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 void addressWrite(ObjectReference src, Address slot, Address value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the Word will be storedslot
- The address into which the Word will be
stored.value
- The value of the new AddressmetaDataA
- 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 Address addressRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean addressBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic boolean addressTryCompareAndSwap(ObjectReference src, Address slot, Address old, Address value, Word metaDataA, Word metaDataB, int mode)
src
- The object into which the Address will be storedslot
- The address into which the Address will be
stored.old
- The old Address to be swapped outvalue
- The new AddressmetaDataA
- 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 void extentWrite(ObjectReference src, Address slot, Extent value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new ExtentmetaDataA
- 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 Extent extentRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean extentBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic void offsetWrite(ObjectReference src, Address slot, Offset value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- The value of the new OffsetmetaDataA
- 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 Offset offsetRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load occurredpublic boolean offsetBulkCopy(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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedpublic void objectReferenceWrite(ObjectReference src, Address slot, ObjectReference value, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
src
- The object into which the new reference will be storedslot
- The address into which the new reference will be
stored.value
- 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 ObjectReference objectReferenceRead(ObjectReference src, Address slot, Word metaDataA, Word metaDataB, int mode)
This is a substituting barrier. The call to this barrier takes the place of a load.
src
- The object reference holding the field being read.slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadmode
- The context in which the load 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.src
- The source arraysrcOffset
- The starting source offsetdst
- The destination arraydstOffset
- The starting destination offsetbytes
- The number of bytes to be copiedtrue
if the update was performed by the barrier, false if
left to the caller (always false in this case).public void objectReferenceNonHeapWrite(Address slot, ObjectReference tgt, Word metaDataA, Word metaDataB)
By default do nothing, override if appropriate.
slot
- The address into which the new reference will be
stored.tgt
- 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 storepublic ObjectReference objectReferenceNonHeapRead(Address slot, Word metaDataA, Word metaDataB)
This is a substituting barrier. The call to this barrier takes the place of a load.
slot
- The address of the slot being read.metaDataA
- A value that assists the host VM in creating a loadmetaDataB
- A value that assists the host VM in creating a loadpublic boolean objectReferenceTryCompareAndSwap(ObjectReference src, Address slot, ObjectReference old, ObjectReference tgt, Word metaDataA, Word metaDataB, int mode)
By default do nothing, override if appropriate.
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 occurredpublic void flush()
public void flushRememberedSets()
public void assertRemsetsFlushed()
public int getId()