|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mmtk.plan.MutatorContext
org.mmtk.plan.SimpleMutator
org.mmtk.plan.StopTheWorldMutator
org.mmtk.plan.semispace.SSMutator
org.mmtk.plan.semispace.gctrace.GCTraceMutator
public class GCTraceMutator
This class implements per-mutator thread behavior and state for the GCTrace plan, which implements a GC tracing algorithm.
Specifically, this class defines SS mutator-time allocation, write barriers, and per-mutator collection semantics.
See GCTrace for an overview of the GC trace algorithm.
SSMutator,
GCTrace,
GCTraceCollector,
StopTheWorldMutator,
MutatorContext| Field Summary |
|---|
| Fields inherited from class org.mmtk.plan.semispace.SSMutator |
|---|
ss |
| Fields inherited from class org.mmtk.plan.MutatorContext |
|---|
immortal, lgcode, log, los, nonmove, smcode |
| Constructor Summary | |
|---|---|
GCTraceMutator()
|
|
| Method Summary | |
|---|---|
void |
collectionPhase(short phaseId,
boolean primary)
Perform a per-mutator collection phase. |
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)
A new reference is about to be created. |
void |
postAlloc(ObjectReference object,
ObjectReference typeRef,
int bytes,
int allocator)
Perform post-allocation actions. |
| Methods inherited from class org.mmtk.plan.semispace.SSMutator |
|---|
alloc, getAllocatorFromSpace, initMutator, show |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GCTraceMutator()
| Method Detail |
|---|
public final void postAlloc(ObjectReference object,
ObjectReference typeRef,
int bytes,
int allocator)
postAlloc in class SSMutatorobject - 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 allocation
public final void objectReferenceWrite(ObjectReference src,
Address slot,
ObjectReference tgt,
Word metaDataA,
Word metaDataB,
int mode)
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 MutatorContextsrc - The object into which the new reference will be storedslot - 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 store
being modifiedmode - The mode of the store (eg putfield, putstatic etc)
public boolean objectReferenceTryCompareAndSwap(ObjectReference src,
Address slot,
ObjectReference old,
ObjectReference tgt,
Word metaDataA,
Word metaDataB,
int mode)
By 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 occured
public 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.
public void collectionPhase(short phaseId,
boolean primary)
collectionPhase in class SSMutatorphaseId - The collection phase to performprimary - perform any single-threaded local activities.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||