|
|||||||||||
| 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
public class SSMutator
This class implements per-mutator thread behavior and state for the SS plan, which implements a full-heap semi-space collector.
Specifically, this class defines SS mutator-time allocation and per-mutator thread collection semantics (flushing and restoring per-mutator allocator state).
See SS for an overview of the semi-space algorithm.
SS,
SSCollector,
StopTheWorldMutator,
MutatorContext| Field Summary | |
|---|---|
protected CopyLocal |
ss
Instance fields |
| Fields inherited from class org.mmtk.plan.MutatorContext |
|---|
immortal, lgcode, log, los, nonmove, smcode |
| Constructor Summary | |
|---|---|
SSMutator()
Constructor |
|
| Method Summary | |
|---|---|
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. |
Allocator |
getAllocatorFromSpace(Space space)
Return the allocator instance associated with a space space, for this plan instance. |
void |
initMutator(int id)
Called before the MutatorContext is used, but after the context has been fully registered and is visible to collection. |
void |
postAlloc(ObjectReference object,
ObjectReference typeRef,
int bytes,
int allocator)
Perform post-allocation actions. |
void |
show()
Show the status of each of the allocators. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final CopyLocal ss
| Constructor Detail |
|---|
public SSMutator()
| Method Detail |
|---|
public void initMutator(int id)
initMutator in class MutatorContextid - The id of this mutator context.
public Address alloc(int bytes,
int align,
int offset,
int allocator,
int site)
alloc in class MutatorContextbytes - 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 site
public void postAlloc(ObjectReference object,
ObjectReference typeRef,
int bytes,
int allocator)
MutatorContext
postAlloc in class MutatorContextobject - 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 MutatorContextspace - 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 SimpleMutatorphaseId - The unique phase identifierprimary - Should this thread be used to execute any single-threaded
local operations?public final void show()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||