org.mmtk.plan
Class PlanConstraints

java.lang.Object
  extended by org.mmtk.plan.PlanConstraints
Direct Known Subclasses:
NoGCConstraints, SimpleConstraints

public abstract class PlanConstraints
extends Object

This class and its subclasses communicate to the host VM/Runtime any features of the selected plan that it needs to know. This is separate from the main Plan/PlanLocal class in order to bypass any issues with ordering of static initialization.


Constructor Summary
PlanConstraints()
           
 
Method Summary
 boolean addressBulkCopySupported()
           
 boolean booleanBulkCopySupported()
           
 boolean byteBulkCopySupported()
           
 boolean charBulkCopySupported()
           
 boolean doubleBulkCopySupported()
           
 boolean extentBulkCopySupported()
           
 boolean floatBulkCopySupported()
           
abstract  int gcHeaderBits()
           
abstract  int gcHeaderWords()
           
 boolean generateGCTrace()
           
 boolean generational()
           
 boolean intBulkCopySupported()
           
 boolean longBulkCopySupported()
           
 int maxNonLOSCopyBytes()
           
 int maxNonLOSDefaultAllocBytes()
           
 int maxNonLOSNonMovingAllocBytes()
           
 boolean movesObjects()
           
 boolean needsAddressReadBarrier()
           
 boolean needsAddressWriteBarrier()
           
 boolean needsBooleanReadBarrier()
           
 boolean needsBooleanWriteBarrier()
           
 boolean needsByteReadBarrier()
           
 boolean needsByteWriteBarrier()
           
 boolean needsCharReadBarrier()
           
 boolean needsCharWriteBarrier()
           
 boolean needsConcurrentWorkers()
           
 boolean needsDoubleReadBarrier()
           
 boolean needsDoubleWriteBarrier()
           
 boolean needsExtentReadBarrier()
           
 boolean needsExtentWriteBarrier()
           
 boolean needsFloatReadBarrier()
           
 boolean needsFloatWriteBarrier()
           
 boolean needsForwardAfterLiveness()
           
 boolean needsIntReadBarrier()
           
 boolean needsIntWriteBarrier()
           
 boolean needsJavaLangReferenceReadBarrier()
           
 boolean needsLinearScan()
           
 boolean needsLogBitInHeader()
           
 boolean needsLongReadBarrier()
           
 boolean needsLongWriteBarrier()
           
 boolean needsObjectReferenceNonHeapReadBarrier()
           
 boolean needsObjectReferenceNonHeapWriteBarrier()
           
 boolean needsObjectReferenceReadBarrier()
           
 boolean needsObjectReferenceWriteBarrier()
           
 boolean needsOffsetReadBarrier()
           
 boolean needsOffsetWriteBarrier()
           
 boolean needsShortReadBarrier()
           
 boolean needsShortWriteBarrier()
           
 boolean needsWordReadBarrier()
           
 boolean needsWordWriteBarrier()
           
 int numSpecializedScans()
           
 boolean objectReferenceBulkCopySupported()
           
 boolean offsetBulkCopySupported()
           
 boolean shortBulkCopySupported()
           
 boolean withGCspy()
           
 boolean wordBulkCopySupported()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanConstraints

public PlanConstraints()
Method Detail

needsJavaLangReferenceReadBarrier

public boolean needsJavaLangReferenceReadBarrier()
Returns:
true if this Plan requires read barriers on java.lang.reference types.

needsBooleanWriteBarrier

public boolean needsBooleanWriteBarrier()
Returns:
true if this Plan requires write barriers on booleans.

needsBooleanReadBarrier

public boolean needsBooleanReadBarrier()
Returns:
true if this Plan requires read barriers on booleans.

booleanBulkCopySupported

public boolean booleanBulkCopySupported()
Returns:
true if this Plan can perform bulk boolean arraycopy barriers.

needsByteWriteBarrier

public boolean needsByteWriteBarrier()
Returns:
true if this Plan requires write barriers on bytes.

needsByteReadBarrier

public boolean needsByteReadBarrier()
Returns:
true if this Plan requires read barriers on bytes.

byteBulkCopySupported

public boolean byteBulkCopySupported()
Returns:
true if this Plan can perform bulk byte arraycopy barriers.

needsCharWriteBarrier

public boolean needsCharWriteBarrier()
Returns:
true if this Plan requires write barriers on chars.

needsCharReadBarrier

public boolean needsCharReadBarrier()
Returns:
true if this Plan requires read barriers on chars.

charBulkCopySupported

public boolean charBulkCopySupported()
Returns:
true if this Plan can perform bulk char arraycopy barriers.

needsShortWriteBarrier

public boolean needsShortWriteBarrier()
Returns:
true if this Plan requires write barriers on shorts.

needsShortReadBarrier

public boolean needsShortReadBarrier()
Returns:
true if this Plan requires read barriers on shorts.

shortBulkCopySupported

public boolean shortBulkCopySupported()
Returns:
true if this Plan can perform bulk short arraycopy barriers.

needsIntWriteBarrier

public boolean needsIntWriteBarrier()
Returns:
true if this Plan requires write barriers on ints.

needsIntReadBarrier

public boolean needsIntReadBarrier()
Returns:
true if this Plan requires read barriers on ints.

intBulkCopySupported

public boolean intBulkCopySupported()
Returns:
true if this Plan can perform bulk int arraycopy barriers.

needsLongWriteBarrier

public boolean needsLongWriteBarrier()
Returns:
true if this Plan requires write barriers on longs.

needsLongReadBarrier

public boolean needsLongReadBarrier()
Returns:
true if this Plan requires read barriers on longs.

longBulkCopySupported

public boolean longBulkCopySupported()
Returns:
true if this Plan can perform bulk long arraycopy barriers.

needsFloatWriteBarrier

public boolean needsFloatWriteBarrier()
Returns:
true if this Plan requires write barriers on floats.

needsFloatReadBarrier

public boolean needsFloatReadBarrier()
Returns:
true if this Plan requires read barriers on floats.

floatBulkCopySupported

public boolean floatBulkCopySupported()
Returns:
true if this Plan can perform bulk float arraycopy barriers.

needsDoubleWriteBarrier

public boolean needsDoubleWriteBarrier()
Returns:
true if this Plan requires write barriers on doubles.

needsDoubleReadBarrier

public boolean needsDoubleReadBarrier()
Returns:
true if this Plan requires read barriers on doubles.

doubleBulkCopySupported

public boolean doubleBulkCopySupported()
Returns:
true if this Plan can perform bulk double arraycopy barriers.

needsWordWriteBarrier

public boolean needsWordWriteBarrier()
Returns:
true if this Plan requires write barriers on Words.

needsWordReadBarrier

public boolean needsWordReadBarrier()
Returns:
true if this Plan requires read barriers on Words.

wordBulkCopySupported

public boolean wordBulkCopySupported()
Returns:
true if this Plan can perform bulk Word arraycopy barriers.

needsAddressWriteBarrier

public boolean needsAddressWriteBarrier()
Returns:
true if this Plan requires write barriers on Address's.

needsAddressReadBarrier

public boolean needsAddressReadBarrier()
Returns:
true if this Plan requires read barriers on Address's.

addressBulkCopySupported

public boolean addressBulkCopySupported()
Returns:
true if this Plan can perform bulk Address arraycopy barriers.

needsExtentWriteBarrier

public boolean needsExtentWriteBarrier()
Returns:
true if this Plan requires write barriers on Extents.

needsExtentReadBarrier

public boolean needsExtentReadBarrier()
Returns:
true if this Plan requires read barriers on Extents.

extentBulkCopySupported

public boolean extentBulkCopySupported()
Returns:
true if this Plan can perform bulk Extent arraycopy barriers.

needsOffsetWriteBarrier

public boolean needsOffsetWriteBarrier()
Returns:
true if this Plan requires write barriers on Offsets.

needsOffsetReadBarrier

public boolean needsOffsetReadBarrier()
Returns:
true if this Plan requires read barriers on Offsets.

offsetBulkCopySupported

public boolean offsetBulkCopySupported()
Returns:
true if this Plan can perform bulk Offset arraycopy barriers.

needsObjectReferenceWriteBarrier

public boolean needsObjectReferenceWriteBarrier()
Returns:
true if this Plan requires write barriers on object references.

needsObjectReferenceReadBarrier

public boolean needsObjectReferenceReadBarrier()
Returns:
true if this Plan requires read barriers on object references.

needsObjectReferenceNonHeapWriteBarrier

public boolean needsObjectReferenceNonHeapWriteBarrier()
Returns:
true if this Plan requires non-heap write barriers on object references.

needsObjectReferenceNonHeapReadBarrier

public boolean needsObjectReferenceNonHeapReadBarrier()
Returns:
true if this Plan requires non-heap read barriers on object references.

objectReferenceBulkCopySupported

public boolean objectReferenceBulkCopySupported()
Returns:
true if this Plan can perform bulk object arraycopy barriers.

needsLinearScan

public boolean needsLinearScan()
Returns:
true if this Plan requires linear scanning.

movesObjects

public boolean movesObjects()
Returns:
true if this Plan moves objects.

maxNonLOSDefaultAllocBytes

public int maxNonLOSDefaultAllocBytes()
Returns:
Size (in bytes) beyond which new regular objects must be allocated to the LOS

maxNonLOSNonMovingAllocBytes

public int maxNonLOSNonMovingAllocBytes()
Returns:
Size (in bytes) beyond which new non-moving objects must be allocated to the LOS

maxNonLOSCopyBytes

public int maxNonLOSCopyBytes()
Returns:
Size (in bytes) beyond which copied objects must be copied to the LOS

needsForwardAfterLiveness

public boolean needsForwardAfterLiveness()
Returns:
true if this object forwards objects after determining global object liveness (e.g. many compacting collectors).

generational

public boolean generational()
Returns:
Is this plan generational in nature.

gcHeaderBits

public abstract int gcHeaderBits()
Returns:
The number of header bits that are required.

gcHeaderWords

public abstract int gcHeaderWords()
Returns:
The number of header words that are required.

withGCspy

public boolean withGCspy()
Returns:
true if this plan contains GCspy.

generateGCTrace

public boolean generateGCTrace()
Returns:
true if this plan contains GCTrace.

numSpecializedScans

public int numSpecializedScans()
Returns:
The specialized scan methods required

needsConcurrentWorkers

public boolean needsConcurrentWorkers()
Returns:
true if this plan requires concurrent worker threads

needsLogBitInHeader

public boolean needsLogBitInHeader()
Returns:
true if this Plan requires a header bit for object logging