|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.vm.VM
public final class VM
This class is responsible for all VM-specific functionality required by MMTk.
The class has three major elements. First it defines VM-specific
constants which are used throughout MMTk, second, it declares
singleton instances of each of the abstract classes in this
package, and third, it provides factory methods for VM-specific
instances which are needed by MMTk (such as Lock
).
Both the constants and the singleton instances are initialized to
VM-specific values at build time using reflection and a VM-specific
factory class. The system property mmtk.hostjvm
is
interrogated at build time to establish concrete instantations of
the abstract classes in this package. By convention,
mmtk.hostjvm
will identify a VM-provided package which
includes concrete instances of each of the abstract classes, with
each concrete class having the same base class name (but different
package name) as the abstract classes defined here. The class
initializer for this class then uses the system property
mmtk.hostjvm
to load the VM-specific concrete classes
and initialize the constants and singletons defined here.
Field Summary | |
---|---|
static ActivePlan |
activePlan
|
static int |
ALIGNMENT_VALUE
The value to store in alignment holes |
static Offset |
ARRAY_BASE_OFFSET
The offset from an array reference to element zero |
static Assert |
assertions
|
static Address |
AVAILABLE_END
The highest address in the contiguously available memory available to MMTk |
static Address |
AVAILABLE_START
The lowest address in the contiguously available memory available to MMTk |
static Barriers |
barriers
|
static Collection |
collection
|
static Config |
config
|
static boolean |
DEBUG
Global debugging switch |
static Debug |
debugging
|
static MMTk_Events |
events
|
private static Factory |
factory
|
static FinalizableProcessor |
finalizableProcessor
|
static Address |
HEAP_END
The highest address in virtual memory known to MMTk |
static Address |
HEAP_START
The lowest address in virtual memory known to MMTk |
static byte |
LOG_BYTES_IN_ADDRESS
The log base two of the size of an address |
static byte |
LOG_BYTES_IN_PAGE
The log base two of the size of an OS page |
static byte |
LOG_BYTES_IN_WORD
The log base two of the size of a word |
static byte |
LOG_MIN_ALIGNMENT
The log base two of the minimum allocation alignment |
static byte |
MAX_ALIGNMENT_SHIFT
The log base two of (MAX_ALIGNMENT/MIN_ALIGNMENT) |
static int |
MAX_BYTES_PADDING
The maximum number of bytes of padding to prepend to an object |
static Memory |
memory
|
static ObjectModel |
objectModel
|
static ReferenceProcessor |
phantomReferences
|
static Scanning |
scanning
|
static ReferenceProcessor |
softReferences
|
static Statistics |
statistics
|
static Strings |
strings
|
static TraceInterface |
traceInterface
|
static boolean |
VERIFY_ASSERTIONS
true if assertions should be verified |
private static String |
vmFactory
|
static ReferenceProcessor |
weakReferences
|
Constructor Summary | |
---|---|
VM()
|
Method Summary | |
---|---|
static ByteStream |
newGCspyByteStream(AbstractDriver driver,
String name,
byte minValue,
byte maxValue,
byte zeroValue,
byte defaultValue,
String stringPre,
String stringPost,
int presentation,
int paintStyle,
int indexMaxStream,
Color colour,
boolean summary)
Create a new ByteStream instance using the appropriate VM-specific concrete ByteStream sub-class. |
static IntStream |
newGCspyIntStream(AbstractDriver driver,
String name,
int minValue,
int maxValue,
int zeroValue,
int defaultValue,
String stringPre,
String stringPost,
int presentation,
int paintStyle,
int indexMaxStream,
Color colour,
boolean summary)
Create a new IntStream instance using the appropriate VM-specific concrete IntStream sub-class. |
static ServerInterpreter |
newGCspyServerInterpreter()
Create a new ServerInterpreter instance using the appropriate VM-specific concrete ServerInterpreter sub-class. |
static ServerSpace |
newGCspyServerSpace(ServerInterpreter serverInterpreter,
String serverName,
String driverName,
String title,
String blockInfo,
int tileNum,
String unused,
boolean mainSpace)
Create a new ServerInterpreter instance using the appropriate VM-specific concrete ServerInterpreter sub-class. |
static ShortStream |
newGCspyShortStream(AbstractDriver driver,
String name,
short minValue,
short maxValue,
short zeroValue,
short defaultValue,
String stringPre,
String stringPost,
int presentation,
int paintStyle,
int indexMaxStream,
Color colour,
boolean summary)
Create a new ShortStream instance using the appropriate VM-specific concrete ShortStream sub-class. |
static Util |
newGCspyUtil()
Create a new Util instance using the appropriate VM-specific concrete Util sub-class. |
static Monitor |
newHeavyCondLock(String name)
Create a new HeavyCondLock instance using the appropriate VM-specific concrete Lock sub-class. |
static Lock |
newLock(String name)
Create a new Lock instance using the appropriate VM-specific concrete Lock sub-class. |
static SynchronizedCounter |
newSynchronizedCounter()
Create a new SynchronizedCounter instance using the appropriate VM-specific concrete SynchronizedCounter sub-class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean VERIFY_ASSERTIONS
true
if assertions should be verified
public static final Address HEAP_START
public static final Address HEAP_END
public static final Address AVAILABLE_START
public static final Address AVAILABLE_END
public static final byte LOG_BYTES_IN_ADDRESS
public static final byte LOG_BYTES_IN_WORD
public static final byte LOG_BYTES_IN_PAGE
public static final byte LOG_MIN_ALIGNMENT
public static final byte MAX_ALIGNMENT_SHIFT
public static final int MAX_BYTES_PADDING
public static final int ALIGNMENT_VALUE
public static final Offset ARRAY_BASE_OFFSET
public static final boolean DEBUG
public static final ActivePlan activePlan
public static final Assert assertions
public static final Barriers barriers
public static final Collection collection
public static final Config config
public static final Memory memory
public static final ObjectModel objectModel
public static final ReferenceProcessor weakReferences
public static final ReferenceProcessor softReferences
public static final ReferenceProcessor phantomReferences
public static final FinalizableProcessor finalizableProcessor
public static final Scanning scanning
public static final Statistics statistics
public static final Strings strings
public static final TraceInterface traceInterface
public static final MMTk_Events events
public static final Debug debugging
private static final Factory factory
private static final String vmFactory
Constructor Detail |
---|
public VM()
Method Detail |
---|
public static Lock newLock(String name)
name
- The string to be associated with this lock instance
Lock
public static Monitor newHeavyCondLock(String name)
name
- The string to be associated with this instance
Monitor
public static SynchronizedCounter newSynchronizedCounter()
SynchronizedCounter
public static Util newGCspyUtil()
Util
public static ServerInterpreter newGCspyServerInterpreter()
ServerInterpreter
public static ServerSpace newGCspyServerSpace(ServerInterpreter serverInterpreter, String serverName, String driverName, String title, String blockInfo, int tileNum, String unused, boolean mainSpace)
ServerInterpreter
public static ByteStream newGCspyByteStream(AbstractDriver driver, String name, byte minValue, byte maxValue, byte zeroValue, byte defaultValue, String stringPre, String stringPost, int presentation, int paintStyle, int indexMaxStream, Color colour, boolean summary)
driver
- The driver that owns this Streamname
- The name of the stream (e.g. "Used space")minValue
- The minimum value for any item in this stream.
Values less than this will be represented as "minValue-"maxValue
- The maximum value for any item in this stream.
Values greater than this will be represented as "maxValue+"zeroValue
- The zero value for this streamdefaultValue
- The default value for this streamstringPre
- A string to prefix values (e.g. "Used: ")stringPost
- A string to suffix values (e.g. " bytes.")presentation
- How a stream value is to be presented.paintStyle
- How the value is to be painted.indexMaxStream
- The index of the maximum stream if the presentation is *_VAR.colour
- The default colour for tiles of this stream
IntStream
public static IntStream newGCspyIntStream(AbstractDriver driver, String name, int minValue, int maxValue, int zeroValue, int defaultValue, String stringPre, String stringPost, int presentation, int paintStyle, int indexMaxStream, Color colour, boolean summary)
driver
- The driver that owns this Streamname
- The name of the stream (e.g. "Used space")minValue
- The minimum value for any item in this stream.
Values less than this will be represented as "minValue-"maxValue
- The maximum value for any item in this stream.
Values greater than this will be represented as "maxValue+"zeroValue
- The zero value for this streamdefaultValue
- The default value for this streamstringPre
- A string to prefix values (e.g. "Used: ")stringPost
- A string to suffix values (e.g. " bytes.")presentation
- How a stream value is to be presented.paintStyle
- How the value is to be painted.indexMaxStream
- The index of the maximum stream if the presentation is *_VAR.colour
- The default colour for tiles of this stream
IntStream
public static ShortStream newGCspyShortStream(AbstractDriver driver, String name, short minValue, short maxValue, short zeroValue, short defaultValue, String stringPre, String stringPost, int presentation, int paintStyle, int indexMaxStream, Color colour, boolean summary)
driver
- The driver that owns this Streamname
- The name of the stream (e.g. "Used space")minValue
- The minimum value for any item in this stream.
Values less than this will be represented as "minValue-"maxValue
- The maximum value for any item in this stream.
Values greater than this will be represented as "maxValue+"zeroValue
- The zero value for this streamdefaultValue
- The default value for this streamstringPre
- A string to prefix values (e.g. "Used: ")stringPost
- A string to suffix values (e.g. " bytes.")presentation
- How a stream value is to be presented.paintStyle
- How the value is to be painted.indexMaxStream
- The index of the maximum stream if the presentation is *_VAR.colour
- The default colour for tiles of this stream
IntStream
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |