org.mmtk.plan
Class Plan

java.lang.Object
  extended by org.mmtk.plan.Plan
All Implemented Interfaces:
Constants
Direct Known Subclasses:
NoGC, Simple

public abstract class Plan
extends Object
implements Constants

This abstract class implements the global core functionality for all memory management schemes. All global MMTk plans should inherit from this class.

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). Thus instance methods of PlanLocal allow fast, unsynchronized 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 int ALLOC_CODE
           
static int ALLOC_COLD_CODE
           
static int ALLOC_DEFAULT
           
static int ALLOC_GCSPY
           
static int ALLOC_HOT_CODE
           
static int ALLOC_IMMORTAL
           
static int ALLOC_LARGE_CODE
           
static int ALLOC_LOS
           
static int ALLOC_NON_MOVING
           
static int ALLOC_NON_REFERENCE
           
static int ALLOC_PRIMITIVE_LOS
           
static int ALLOC_STACK
           
protected static int allocationSiteCount
          Support for allocation-site identification
static int ALLOCATORS
           
protected static boolean awaitingAsyncCollection
           
protected static int collectionTrigger
           
private static boolean collectionTriggered
           
static int DEFAULT_MAX_NURSERY
           
static int DEFAULT_MIN_NURSERY
           
static int DEFAULT_POLL_FREQUENCY
           
static int DEFAULT_SITE
           
protected static boolean emergencyCollection
           
static boolean GATHER_WRITE_BARRIER_STATS
           
static int GC_PREPARE
           
static int GC_PROPER
           
private static int gcStatus
           
static int HEAP_FULL_MINIMUM
           
static int HEAP_FULL_PERCENTAGE
           
static int IMMORTAL
           
static ImmortalSpace immortalSpace
          Any immortal objects allocated after booting are allocated here.
private static boolean initialized
           
protected static boolean insideHarness
          Harness
static int LARGE_CODE
           
static LargeObjectSpace largeCodeSpace
           
private  long lastStressPages
           
static int LOS
           
static LargeObjectSpace loSpace
          Large objects are allocated into a special large object space.
static int MAX_COLLECTION_ATTEMPTS
           
static int MAX_NON_LOS_COPY_BYTES
           
static int MAX_NON_LOS_DEFAULT_ALLOC_BYTES
           
static int MAX_NON_LOS_NONMOVING_ALLOC_BYTES
           
static int META
           
static int META_DATA_POLL_FREQUENCY
           
static RawPageSpace metaDataSpace
          All meta data that is used by MMTk is allocated (and accounted for) in the meta data space.
static boolean NEEDS_LOG_BIT_IN_HEADER
           
static int NON_MOVING
           
static int NON_PARTICIPANT
           
static MarkSweepSpace nonMovingSpace
          Space used to allocate objects that cannot be moved. we do not need a large space as the LOS is non-moving.
static int NOT_IN_GC
          Constants
static float PLOS_FRAC
           
protected static int requiredAtStart
          GC State
static int SANITY
           
static SanityChecker sanityChecker
          Global sanity checking state
static RawPageSpace sanitySpace
          Space used by the sanity checker (used at runtime only if sanity checking enabled
static boolean SCAN_BOOT_IMAGE
           
static int SMALL_CODE
           
static MarkSweepSpace smallCodeSpace
           
protected static boolean stacksPrepared
           
protected static long timeCap
          Support for time-limited GCs
static Timer totalTime
          Timer that counts total time
static boolean USE_CODE_SPACE
           
static int VM_SPACE
           
static Space vmSpace
          The space that holds any VM specific objects (e.g. a boot image)
 
Fields inherited from interface org.mmtk.utility.Constants
ALIGNMENT_VALUE, ARRAY_ELEMENT, BITS_IN_ADDRESS, BITS_IN_BYTE, BITS_IN_CHAR, BITS_IN_INT, BITS_IN_PAGE, BITS_IN_SHORT, BITS_IN_WORD, BYTES_IN_ADDRESS, BYTES_IN_BYTE, BYTES_IN_CHAR, BYTES_IN_INT, BYTES_IN_KBYTE, BYTES_IN_MBYTE, BYTES_IN_PAGE, BYTES_IN_SHORT, BYTES_IN_WORD, CARD_MASK, CARD_META_PAGES_PER_REGION, INSTANCE_FIELD, LOG_BITS_IN_ADDRESS, LOG_BITS_IN_BYTE, LOG_BITS_IN_CHAR, LOG_BITS_IN_INT, LOG_BITS_IN_PAGE, LOG_BITS_IN_SHORT, LOG_BITS_IN_WORD, LOG_BYTES_IN_ADDRESS, LOG_BYTES_IN_ADDRESS_SPACE, LOG_BYTES_IN_BYTE, LOG_BYTES_IN_CHAR, LOG_BYTES_IN_INT, LOG_BYTES_IN_KBYTE, LOG_BYTES_IN_MBYTE, LOG_BYTES_IN_PAGE, LOG_BYTES_IN_SHORT, LOG_BYTES_IN_WORD, LOG_CARD_BYTES, LOG_CARD_GRAIN, LOG_CARD_META_BYTES, LOG_CARD_META_PAGES, LOG_CARD_META_SIZE, LOG_CARD_UNITS, LOG_MIN_ALIGNMENT, MAX_ALIGNMENT, MAX_BYTES_PADDING, MAX_INT, MIN_ALIGNMENT, MIN_INT, SUPPORT_CARD_SCANNING
 
Constructor Summary
Plan()
          Constructor.
 
Method Summary
static Extent availableMemory()
          Return the amount of available memory, in bytes.
 void boot()
          The boot method is called early in the boot process before any allocation.
 Word bootTimeWriteBarrier(Word reference)
          Perform any required write barrier action when installing an object reference a boot time.
static void checkForAsyncCollection()
          Check whether an asynchronous collection is pending.
static void collectionComplete()
          A collection has fully completed.
abstract  void collectionPhase(short phase)
          Perform a (global) collection phase.
protected  boolean collectionRequired(boolean spaceFull)
          This method controls the triggering of a GC.
protected  boolean concurrentCollectionRequired()
          This method controls the triggering of an atomic phase of a concurrent collection.
 void forceFullHeapCollection()
          Force the next collection to be full heap.
static Extent freeMemory()
          Return the amount of free memory, in bytes (where free is defined as not in use).
 void fullyBooted()
          The fullyBooted method is called by the runtime just before normal execution commences.
static boolean gcInProgress()
          Return true if a collection is in progress.
static boolean gcInProgressProper()
          Return true if a collection is in progress and past the preparatory stage.
static int getAllocationSite(boolean compileTime)
          Allocation
 int getCollectionReserve()
          Return the number of pages reserved for collection.
 int getHeapFullThreshold()
          The minimum number of pages a GC must have available after a collection for us to consider the collection successful.
 int getMetaDataPagesUsed()
          Return the number of metadata pages reserved for use given the pending allocation.
 int getPagesAvail()
          Return the number of pages available for allocation.
 int getPagesRequired()
          Calculate the number of pages a collection is required to free to satisfy outstanding allocation requests.
 int getPagesReserved()
          Return the number of pages reserved for use given the pending allocation.
 int getPagesUsed()
          Return the number of pages reserved for use given the pending allocation.
 Class<?> getSpecializedScanClass(int id)
          Get the specialized scan with the given id.
static long getTimeCap()
          Return the cycle time at which this GC should complete.
 int getTotalPages()
          Return the total amount of memory managed to the memory management system, in pages.
static void harnessBegin()
          Generic hook to allow benchmarks to be harnessed.
static void harnessEnd()
          Generic hook to allow benchmarks to be harnessed.
 void insertPhaseAfter(int markerScheduledPhase, int scheduledPhase)
          Insert a phase.
static boolean isCollectionTriggered()
          Has collection has triggered?
 boolean isCurrentGCNursery()
           
static boolean isEmergencyCollection()
           
static boolean isInitialized()
           
 boolean lastCollectionFailed()
           
 boolean lastCollectionFullHeap()
           
 boolean lastCollectionWasExhaustive()
           
 ObjectReference loadObjectReference(Address slot)
          Load an object reference
private  void logPoll(Space space, String message)
          Log a message from within 'poll'
 void notifyExit(int value)
          The VM is about to exit.
 boolean poll(boolean spaceFull, Space space)
          This method is called periodically by the allocation subsystem (by default, each time a page is consumed), and provides the collector with an opportunity to collect.
 void postBoot()
          The postBoot method is called by the runtime immediately after command-line arguments are available.
protected  void printDetailedTiming(boolean totals)
          Any Plan can override this to provide additional plan specific timing information.
 void printPostStats()
          Print out statistics at the end of a GC
 void printPreStats()
          Print out statistics at the start of a GC
 void printUsedPages()
           
protected  void registerSpecializedMethods()
          Register specialized methods.
 void replacePhase(int oldScheduledPhase, int scheduledPhase)
          Replace a phase.
static Extent reservedMemory()
          Return the amount of memory in use, in bytes.
 int sanityExpectedRC(ObjectReference object, int sanityRootRC)
          Return the expected reference count.
 void sanityLinearScan(LinearScan scanner)
          Perform a linear scan of all spaces to check for possible leaks.
protected static void setAwaitingAsyncCollection()
          Request an async GC
static void setCollectionTrigger(int trigger)
          Set the collection trigger.
static void setCollectionTriggered()
          Set that a collection has been triggered.
static void setGCStatus(int s)
          Sets the GC status.
static boolean stacksPrepared()
          Return true if stacks have been prepared in this collection cycle.
 void startGCspyServer(int port, boolean wait)
          Start GCspy server.
 void storeObjectReference(Address slot, ObjectReference value)
          Store an object reference
 boolean stressTestGCRequired()
           
static Extent totalMemory()
          Return the total amount of memory managed to the memory management system, in bytes.
static Extent usedMemory()
          Return the amount of memory in use, in bytes.
 boolean willNeverMove(ObjectReference object)
          Can this object ever move.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_IN_GC

public static final int NOT_IN_GC
Constants

See Also:
Constant Field Values

GC_PREPARE

public static final int GC_PREPARE
See Also:
Constant Field Values

GC_PROPER

public static final int GC_PROPER
See Also:
Constant Field Values

DEFAULT_POLL_FREQUENCY

public static final int DEFAULT_POLL_FREQUENCY

META_DATA_POLL_FREQUENCY

public static final int META_DATA_POLL_FREQUENCY

USE_CODE_SPACE

public static final boolean USE_CODE_SPACE
See Also:
Constant Field Values

PLOS_FRAC

public static final float PLOS_FRAC
See Also:
Constant Field Values

HEAP_FULL_MINIMUM

public static final int HEAP_FULL_MINIMUM

HEAP_FULL_PERCENTAGE

public static final int HEAP_FULL_PERCENTAGE
See Also:
Constant Field Values

ALLOC_DEFAULT

public static final int ALLOC_DEFAULT
See Also:
Constant Field Values

ALLOC_NON_REFERENCE

public static final int ALLOC_NON_REFERENCE
See Also:
Constant Field Values

ALLOC_NON_MOVING

public static final int ALLOC_NON_MOVING
See Also:
Constant Field Values

ALLOC_IMMORTAL

public static final int ALLOC_IMMORTAL
See Also:
Constant Field Values

ALLOC_LOS

public static final int ALLOC_LOS
See Also:
Constant Field Values

ALLOC_PRIMITIVE_LOS

public static final int ALLOC_PRIMITIVE_LOS
See Also:
Constant Field Values

ALLOC_GCSPY

public static final int ALLOC_GCSPY
See Also:
Constant Field Values

ALLOC_CODE

public static final int ALLOC_CODE
See Also:
Constant Field Values

ALLOC_LARGE_CODE

public static final int ALLOC_LARGE_CODE
See Also:
Constant Field Values

ALLOC_HOT_CODE

public static final int ALLOC_HOT_CODE
See Also:
Constant Field Values

ALLOC_COLD_CODE

public static final int ALLOC_COLD_CODE
See Also:
Constant Field Values

ALLOC_STACK

public static final int ALLOC_STACK
See Also:
Constant Field Values

ALLOCATORS

public static final int ALLOCATORS
See Also:
Constant Field Values

DEFAULT_SITE

public static final int DEFAULT_SITE
See Also:
Constant Field Values

NON_PARTICIPANT

public static final int NON_PARTICIPANT
See Also:
Constant Field Values

GATHER_WRITE_BARRIER_STATS

public static final boolean GATHER_WRITE_BARRIER_STATS
See Also:
Constant Field Values

DEFAULT_MIN_NURSERY

public static final int DEFAULT_MIN_NURSERY

DEFAULT_MAX_NURSERY

public static final int DEFAULT_MAX_NURSERY

SCAN_BOOT_IMAGE

public static final boolean SCAN_BOOT_IMAGE
See Also:
Constant Field Values

MAX_COLLECTION_ATTEMPTS

public static final int MAX_COLLECTION_ATTEMPTS
See Also:
Constant Field Values

MAX_NON_LOS_DEFAULT_ALLOC_BYTES

public static final int MAX_NON_LOS_DEFAULT_ALLOC_BYTES

MAX_NON_LOS_NONMOVING_ALLOC_BYTES

public static final int MAX_NON_LOS_NONMOVING_ALLOC_BYTES

MAX_NON_LOS_COPY_BYTES

public static final int MAX_NON_LOS_COPY_BYTES

NEEDS_LOG_BIT_IN_HEADER

public static final boolean NEEDS_LOG_BIT_IN_HEADER

vmSpace

public static final Space vmSpace
The space that holds any VM specific objects (e.g. a boot image)


immortalSpace

public static final ImmortalSpace immortalSpace
Any immortal objects allocated after booting are allocated here.


metaDataSpace

public static final RawPageSpace metaDataSpace
All meta data that is used by MMTk is allocated (and accounted for) in the meta data space.


loSpace

public static final LargeObjectSpace loSpace
Large objects are allocated into a special large object space.


sanitySpace

public static final RawPageSpace sanitySpace
Space used by the sanity checker (used at runtime only if sanity checking enabled


nonMovingSpace

public static final MarkSweepSpace nonMovingSpace
Space used to allocate objects that cannot be moved. we do not need a large space as the LOS is non-moving.


smallCodeSpace

public static final MarkSweepSpace smallCodeSpace

largeCodeSpace

public static final LargeObjectSpace largeCodeSpace

IMMORTAL

public static final int IMMORTAL

VM_SPACE

public static final int VM_SPACE

META

public static final int META

LOS

public static final int LOS

SANITY

public static final int SANITY

NON_MOVING

public static final int NON_MOVING

SMALL_CODE

public static final int SMALL_CODE

LARGE_CODE

public static final int LARGE_CODE

totalTime

public static final Timer totalTime
Timer that counts total time


timeCap

protected static long timeCap
Support for time-limited GCs


allocationSiteCount

protected static int allocationSiteCount
Support for allocation-site identification


sanityChecker

public static final SanityChecker sanityChecker
Global sanity checking state


lastStressPages

private long lastStressPages

requiredAtStart

protected static int requiredAtStart
GC State


collectionTrigger

protected static int collectionTrigger

emergencyCollection

protected static boolean emergencyCollection

awaitingAsyncCollection

protected static boolean awaitingAsyncCollection

stacksPrepared

protected static boolean stacksPrepared

initialized

private static boolean initialized

collectionTriggered

private static boolean collectionTriggered

gcStatus

private static int gcStatus

insideHarness

protected static boolean insideHarness
Harness

Constructor Detail

Plan

public Plan()
Constructor.

Method Detail

boot

public void boot()
The boot method is called early in the boot process before any allocation.


postBoot

public void postBoot()
The postBoot method is called by the runtime immediately after command-line arguments are available. Note that allocation must be supported prior to this point because the runtime infrastructure may require allocation in order to parse the command line arguments. For this reason all plans should operate gracefully on the default minimum heap size until the point that boot is called.


fullyBooted

public void fullyBooted()
The fullyBooted method is called by the runtime just before normal execution commences.


notifyExit

public void notifyExit(int value)
The VM is about to exit. Perform any clean up operations.

Parameters:
value - The exit value

printDetailedTiming

protected void printDetailedTiming(boolean totals)
Any Plan can override this to provide additional plan specific timing information.

Parameters:
totals - Print totals

bootTimeWriteBarrier

public Word bootTimeWriteBarrier(Word reference)
Perform any required write barrier action when installing an object reference a boot time.

Parameters:
reference - the reference value that is to be stored
Returns:
The raw value to be

getAllocationSite

public static int getAllocationSite(boolean compileTime)
Allocation


collectionPhase

public abstract void collectionPhase(short phase)
Perform a (global) collection phase.


replacePhase

public void replacePhase(int oldScheduledPhase,
                         int scheduledPhase)
Replace a phase.

Parameters:
oldScheduledPhase - The scheduled phase to insert after
scheduledPhase - The scheduled phase to insert

insertPhaseAfter

public void insertPhaseAfter(int markerScheduledPhase,
                             int scheduledPhase)
Insert a phase.

Parameters:
markerScheduledPhase - The scheduled phase to insert after
scheduledPhase - The scheduled phase to insert

lastCollectionWasExhaustive

public boolean lastCollectionWasExhaustive()
Returns:
Whether last GC was an exhaustive attempt to collect the heap. For many collectors this is the same as asking whether the last GC was a full heap collection.

lastCollectionFullHeap

public boolean lastCollectionFullHeap()
Returns:
Whether last GC is a full GC.

isEmergencyCollection

public static boolean isEmergencyCollection()
Returns:
Is last GC a full collection?

lastCollectionFailed

public final boolean lastCollectionFailed()
Returns:
True if we have run out of heap space.

forceFullHeapCollection

public void forceFullHeapCollection()
Force the next collection to be full heap.


isCurrentGCNursery

public boolean isCurrentGCNursery()
Returns:
Is current GC only collecting objects allocated since last GC.

sanityExpectedRC

public int sanityExpectedRC(ObjectReference object,
                            int sanityRootRC)
Return the expected reference count. For non-reference counting collectors this becomes a true/false relationship.

Parameters:
object - The object to check.
sanityRootRC - The number of root references to the object.
Returns:
The expected (root excluded) reference count.

sanityLinearScan

public void sanityLinearScan(LinearScan scanner)
Perform a linear scan of all spaces to check for possible leaks. This is only called after a full-heap GC.

Parameters:
scanner - The scanner callback to use.

stressTestGCRequired

public final boolean stressTestGCRequired()
Returns:
True is a stress test GC is required

isInitialized

public static boolean isInitialized()
Returns:
Is the memory management system initialized?

isCollectionTriggered

public static boolean isCollectionTriggered()
Has collection has triggered?


setCollectionTriggered

public static void setCollectionTriggered()
Set that a collection has been triggered.


collectionComplete

public static void collectionComplete()
A collection has fully completed. Clear the triggered flag.


stacksPrepared

public static boolean stacksPrepared()
Return true if stacks have been prepared in this collection cycle.

Returns:
True if stacks have been prepared in this collection cycle.

gcInProgress

public static boolean gcInProgress()
Return true if a collection is in progress.

Returns:
True if a collection is in progress.

gcInProgressProper

public static boolean gcInProgressProper()
Return true if a collection is in progress and past the preparatory stage.

Returns:
True if a collection is in progress and past the preparatory stage.

setGCStatus

public static void setGCStatus(int s)
Sets the GC status.

Parameters:
s - The new GC status.

printPreStats

public void printPreStats()
Print out statistics at the start of a GC


printPostStats

public final void printPostStats()
Print out statistics at the end of a GC


printUsedPages

public final void printUsedPages()

setCollectionTrigger

public static void setCollectionTrigger(int trigger)
Set the collection trigger.


harnessBegin

public static void harnessBegin()
Generic hook to allow benchmarks to be harnessed. A plan may use this to perform certain actions prior to the commencement of a benchmark, such as a full heap collection, turning on instrumentation, etc. By default we do a full heap GC, and then start stats collection.


harnessEnd

public static void harnessEnd()
Generic hook to allow benchmarks to be harnessed. A plan may use this to perform certain actions after the completion of a benchmark, such as a full heap collection, turning off instrumentation, etc. By default we stop all statistics objects and print their values.


freeMemory

public static Extent freeMemory()
Return the amount of free memory, in bytes (where free is defined as not in use). Note that this may overstate the amount of available memory, which must account for unused memory that is held in reserve for copying, and therefore unavailable for allocation.

Returns:
The amount of free memory, in bytes (where free is defined as not in use).

availableMemory

public static Extent availableMemory()
Return the amount of available memory, in bytes. Note that this accounts for unused memory that is held in reserve for copying, and therefore unavailable for allocation.

Returns:
The amount of available memory, in bytes.

usedMemory

public static Extent usedMemory()
Return the amount of memory in use, in bytes. Note that this excludes unused memory that is held in reserve for copying, and therefore unavailable for allocation.

Returns:
The amount of memory in use, in bytes.

reservedMemory

public static Extent reservedMemory()
Return the amount of memory in use, in bytes. Note that this includes unused memory that is held in reserve for copying, and therefore unavailable for allocation.

Returns:
The amount of memory in use, in bytes.

totalMemory

public static Extent totalMemory()
Return the total amount of memory managed to the memory management system, in bytes.

Returns:
The total amount of memory managed to the memory management system, in bytes.

getTotalPages

public final int getTotalPages()
Return the total amount of memory managed to the memory management system, in pages.

Returns:
The total amount of memory managed to the memory management system, in pages.

getPagesAvail

public int getPagesAvail()
Return the number of pages available for allocation.

Returns:
The number of pages available for allocation.

getPagesReserved

public final int getPagesReserved()
Return the number of pages reserved for use given the pending allocation. Sub-classes must override the getCopyReserve method, as the arithmetic here is fixed.

Returns:
The number of pages reserved given the pending allocation, including space reserved for copying.

getCollectionReserve

public int getCollectionReserve()
Return the number of pages reserved for collection. In most cases this is a copy reserve, all subclasses that manage a copying space must add the copying contribution.

Returns:
The number of pages reserved given the pending allocation, including space reserved for collection.

getPagesUsed

public int getPagesUsed()
Return the number of pages reserved for use given the pending allocation.

Returns:
The number of pages reserved given the pending allocation, excluding space reserved for copying.

getPagesRequired

public int getPagesRequired()
Calculate the number of pages a collection is required to free to satisfy outstanding allocation requests.

Returns:
the number of pages a collection is required to free to satisfy outstanding allocation requests.

getHeapFullThreshold

public int getHeapFullThreshold()
The minimum number of pages a GC must have available after a collection for us to consider the collection successful.


getMetaDataPagesUsed

public int getMetaDataPagesUsed()
Return the number of metadata pages reserved for use given the pending allocation.

Returns:
The number of pages reserved given the pending allocation, excluding space reserved for copying.

getTimeCap

public static long getTimeCap()
Return the cycle time at which this GC should complete.

Returns:
The time cap for this GC (i.e. the time by which it should complete).

storeObjectReference

public void storeObjectReference(Address slot,
                                 ObjectReference value)
Store an object reference

Parameters:
slot - The location of the reference
value - The value to store

loadObjectReference

public ObjectReference loadObjectReference(Address slot)
Load an object reference

Parameters:
slot - The location of the reference
Returns:
the object reference loaded from slot

poll

public final boolean poll(boolean spaceFull,
                          Space space)
This method is called periodically by the allocation subsystem (by default, each time a page is consumed), and provides the collector with an opportunity to collect.

Parameters:
spaceFull - Space request failed, must recover pages within 'space'.
space - The space that triggered the poll.
Returns:
true if a collection is required.

checkForAsyncCollection

public static void checkForAsyncCollection()
Check whether an asynchronous collection is pending.

This is decoupled from the poll() mechanism because the triggering of asynchronous collections can trigger write barriers, which can trigger an asynchronous collection. Thus, if the triggering were tightly coupled with the request to alloc() within the write buffer code, then inifinite regress could result. There is no race condition in the following code since there is no harm in triggering the collection more than once, thus it is unsynchronized.


setAwaitingAsyncCollection

protected static void setAwaitingAsyncCollection()
Request an async GC


logPoll

private void logPoll(Space space,
                     String message)
Log a message from within 'poll'

Parameters:
space -
message -

collectionRequired

protected boolean collectionRequired(boolean spaceFull)
This method controls the triggering of a GC. It is called periodically during allocation. Returns true to trigger a collection.

Parameters:
spaceFull - Space request failed, must recover pages within 'space'.
Returns:
True if a collection is requested by the plan.

concurrentCollectionRequired

protected boolean concurrentCollectionRequired()
This method controls the triggering of an atomic phase of a concurrent collection. It is called periodically during allocation.

Returns:
True if a collection is requested by the plan.

startGCspyServer

public void startGCspyServer(int port,
                             boolean wait)
Start GCspy server.

Parameters:
port - The port to listen on,
wait - Should we wait for a client to connect?

willNeverMove

public boolean willNeverMove(ObjectReference object)
Can this object ever move. Used by the VM to make decisions about whether it needs to copy IO buffers etc.

Parameters:
object - The object in question
Returns:
True if it is not possible that the object will ever move.

registerSpecializedMethods

protected void registerSpecializedMethods()
Register specialized methods.


getSpecializedScanClass

public final Class<?> getSpecializedScanClass(int id)
Get the specialized scan with the given id.