|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.vm.gcspy.Stream
public abstract class Stream
Abstract class for a GCspy Stream. Implementing classes will mostly forward calls to the gcspy C library
Field Summary | |
---|---|
protected static boolean |
DEBUG
|
private int |
max
The maximum value for tiles |
private int |
min
The minimum value for tiles |
protected int |
presentation
the presentation style |
protected ServerSpace |
serverSpace
The owning GCspy space |
protected Address |
stream
The address of the C stream, gcspy_gc_stream_t *stream, used in all calls to the C library |
protected int |
streamId
The stream's ID |
protected int |
summary0
The first summary value |
protected int |
summary1
The second summary value (if any) |
protected boolean |
summaryEnabled
use summaries? |
protected int |
summaryLen
A summary has 1 or 2 values depending on presentation style (PERCENT* styles require 2 values). |
Constructor Summary | |
---|---|
protected |
Stream(AbstractDriver driver,
int dataType,
String name,
int minValue,
int maxValue,
int zeroValue,
int defaultValue,
String stringPre,
String stringPost,
int presentation,
int paintStyle,
int indexMaxStream,
Color colour,
boolean summary)
Construct a new GCspy stream. |
Method Summary | |
---|---|
int |
getMaxValue()
Return the maximum value expected for this stream. |
int |
getMinValue()
Return the minimum value expected for this stream. |
abstract void |
send(int event,
int numTiles)
Send the data for this stream. |
void |
sendSummary()
Send the summary data for this stream. |
void |
setStream(int id,
Address str)
Set the stream address and id (called by AbstractDriver.addStream). |
void |
setSummary(int value0)
Set the summary value for presentation styles with just one value |
void |
setSummary(int value0,
int value1)
Set the summary values for presentation styles with two values (i.e. |
private void |
setupSummary(int presentation)
Setup the summary array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Address stream
protected ServerSpace serverSpace
protected int streamId
protected int summaryLen
protected int summary0
protected int summary1
private int min
private int max
protected boolean summaryEnabled
protected int presentation
protected static final boolean DEBUG
Constructor Detail |
---|
protected Stream(AbstractDriver driver, int dataType, 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 AbstractDriver that owns this StreamdataType
- The stream's data type, one of BYTE_TYPE, SHORT_TYPE or INT_TYPEname
- 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 for the maximum stream if the presentation is *_VAR.colour
- The default colour for tiles of this streamsummary
- Is a summary enabled?Method Detail |
---|
public void setStream(int id, Address str)
id
- the idstr
- the address of the gcspy C gcspy_gc_stream_t *streampublic int getMinValue()
public int getMaxValue()
private void setupSummary(int presentation)
presentation
- the presentation stylepublic void setSummary(int value0)
value0
- the valuepublic void setSummary(int value0, int value1)
value0
- the numerator valuevalue1
- the denominator valuepublic abstract void send(int event, int numTiles)
event
- the event.numTiles
- the number of tiles to send (which may be less than maxTileNum)public void sendSummary()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |