|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.plan.Plan org.mmtk.plan.Simple org.mmtk.plan.StopTheWorld org.mmtk.plan.marksweep.MS org.mmtk.plan.stickyms.StickyMS
public class StickyMS
This class implements the global state of a simple sticky mark bits collector, based a simple on mark-sweep collector. The sticky mark bits algorithm is due to Demmers et al. (http://doi.acm.org/10.1145/96709.96735), and allows generational collection to be performed in a non-moving heap by overloading the role of mark bits to also indicate whether an object is new (nursery) or not. Thus nursery objects are identified by a bit in their header, not by where they lie within the address space. While Demmers et al. did their work in a conservative collector, here we have an exact collector, so we can use a regular write barrier, and don't need to use page protection etc.
All plans make a clear distinction between global and thread-local activities, and divides global and local state into separate class hierarchies. Global activities must be synchronized, whereas no synchronization is required for thread-local activities. There is a single instance of Plan (or the appropriate sub-class), and a 1:1 mapping of PlanLocal to "kernel threads" (aka CPUs or in Jikes RVM, Processors). Thus instance methods of PlanLocal allow fast, unsychronized access to functions such as allocation and collection.
The global instance defines and manages static resources (such as memory and virtual memory resources). This mapping of threads to instances is crucial to understanding the correctness and performance properties of MMTk plans.
Field Summary | |
---|---|
boolean |
collectWholeHeap
will this collection collect the whole heap |
(package private) static boolean |
MAJOR_GC_ONLY
If true then we only do full heap GCs---so we're like MarkSweep (+ write barrier) |
SharedDeque |
modPool
Remset pool |
boolean |
nextGCWholeHeap
will the next collection collect the whole heap? |
(package private) static boolean |
NURSERY_COLLECT_PLOS
If true , then new PLOS objects are collected at each nursery GC |
static int |
SCAN_NURSERY
|
Fields inherited from class org.mmtk.plan.marksweep.MS |
---|
MARK_SWEEP, msSpace, msTrace, SCAN_MARK |
Fields inherited from class org.mmtk.plan.StopTheWorld |
---|
postSanityPhase, preSanityPhase |
Constructor Summary | |
---|---|
StickyMS()
|
Method Summary | |
---|---|
void |
collectionPhase(short phaseId)
Perform a (global) collection phase. |
void |
forceFullHeapCollection()
Force the next collection to be full heap. |
boolean |
isCurrentGCNursery()
|
boolean |
isLastGCFull()
|
void |
printPreStats()
Print pre-collection statistics. |
protected void |
registerSpecializedMethods()
Register specialized methods. |
int |
sanityExpectedRC(ObjectReference object,
int sanityRootRC)
Return the expected reference count. |
void |
userTriggeredGC()
A user-triggered GC has been initiated. |
Methods inherited from class org.mmtk.plan.marksweep.MS |
---|
getPagesUsed, willNeverMove |
Methods inherited from class org.mmtk.plan.StopTheWorld |
---|
processOptions |
Methods inherited from class org.mmtk.plan.Simple |
---|
replacePhase, replacePlaceholderPhase, switchNurseryZeroingApproach |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final boolean NURSERY_COLLECT_PLOS
true
, then new PLOS objects are collected at each nursery GC
static final boolean MAJOR_GC_ONLY
true
then we only do full heap GCs---so we're like MarkSweep (+ write barrier)
public static int SCAN_NURSERY
public boolean nextGCWholeHeap
public boolean collectWholeHeap
public final SharedDeque modPool
Constructor Detail |
---|
public StickyMS()
Method Detail |
---|
public void userTriggeredGC()
public void forceFullHeapCollection()
Plan
forceFullHeapCollection
in class Plan
public final void collectionPhase(short phaseId)
MS
collectionPhase
in class MS
phaseId
- The unique id of the phase to perform.public void printPreStats()
printPreStats
in class Plan
public final boolean isCurrentGCNursery()
isCurrentGCNursery
in class Plan
public final boolean isLastGCFull()
public int sanityExpectedRC(ObjectReference object, int sanityRootRC)
Plan
true/false
relationship.
sanityExpectedRC
in class Plan
object
- The object to check.sanityRootRC
- The number of root references to the object.
protected void registerSpecializedMethods()
Plan
registerSpecializedMethods
in class MS
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |