|
|||||||||||
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.immix.Immix org.mmtk.plan.stickyimmix.StickyImmix
public class StickyImmix
This class implements the global state of a simple sticky mark bits collector, based on an immix 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.
See the PLDI'08 paper by Blackburn and McKinley for a description of the algorithm: http://doi.acm.org/10.1145/1375581.1375586
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 | |
---|---|
static BooleanCounter |
fullHeap
|
private static int |
lastCommittedImmixPages
TODO: this field is unused, somebody with MMTk knowledge needs to look at it |
(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 |
(package private) static boolean |
NURSERY_COLLECT_PLOS
If true, then new PLOS objects are collected at each nursery GC |
static int |
SCAN_NURSERY
|
protected static float |
SURVIVAL_ESTIMATE
estimated collection yield |
Fields inherited from class org.mmtk.plan.immix.Immix |
---|
collectWholeHeap, IMMIX, immixSpace, immixTrace, lastGCWasDefrag, nextGCWholeHeap, SCAN_DEFRAG, SCAN_IMMIX |
Fields inherited from class org.mmtk.plan.StopTheWorld |
---|
postSanityPhase, preSanityPhase |
Constructor Summary | |
---|---|
StickyImmix()
Constructor. |
Method Summary | |
---|---|
void |
collectionPhase(short phaseId)
Perform a (global) collection phase. |
boolean |
collectionRequired(boolean spaceFull,
Space space)
This method controls the triggering of a GC. |
void |
forceFullHeapCollection()
Force the next collection to be full heap. |
int |
getCollectionReserve()
Return the number of pages reserved for collection. |
boolean |
isCurrentGCNursery()
|
boolean |
isLastGCFull()
|
void |
printPreStats()
Print pre-collection statistics. |
protected void |
registerSpecializedMethods()
Register specialized methods. |
protected boolean |
requiresFullHeapCollection()
Determine whether this GC should be a full heap collection. |
void |
userTriggeredGC()
A user-triggered GC has been initiated. |
Methods inherited from class org.mmtk.plan.immix.Immix |
---|
getPagesUsed, lastCollectionWasExhaustive, 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
static final boolean MAJOR_GC_ONLY
protected static final float SURVIVAL_ESTIMATE
public static int SCAN_NURSERY
private static int lastCommittedImmixPages
public static BooleanCounter fullHeap
public final SharedDeque modPool
Constructor Detail |
---|
public StickyImmix()
Method Detail |
---|
public void userTriggeredGC()
public void forceFullHeapCollection()
Plan
forceFullHeapCollection
in class Plan
public final void collectionPhase(short phaseId)
Immix
collectionPhase
in class Immix
phaseId
- The unique id of the phase to perform.public final boolean collectionRequired(boolean spaceFull, Space space)
true
to trigger a collection.
collectionRequired
in class Plan
spaceFull
- Space request failed, must recover pages within 'space'.space
- TODO
true
if a collection is requested by the plan.protected boolean requiresFullHeapCollection()
public int getCollectionReserve()
Immix
getCollectionReserve
in class Immix
public void printPreStats()
printPreStats
in class Plan
public final boolean isCurrentGCNursery()
isCurrentGCNursery
in class Plan
public final boolean isLastGCFull()
protected void registerSpecializedMethods()
Plan
registerSpecializedMethods
in class Immix
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |