public final class Feedlet extends Object
A Feedlet is a entity that is a unit of trace generation for TuningFork. In Jikes RVM, a Feedlet is typically associated with a VM_Thread.
Note an important assumption that a Feedlet will only be used by a single thread at a time. All operations are unsynchronized. This invariant is usually met because only the VM_Thread to which it is attached is allowed to perform addEvent operations on the Feedlet. If a Feedlet is attached to something other than a VM_Thread, then this invariant must be established via external synchronization.
Modifier and Type | Field and Description |
---|---|
private static boolean |
CHECK_TYPES |
(package private) boolean |
enabled
Enabled is true when TF engine is enabled, false otherwise.
|
private TraceEngine |
engine |
private EventChunk |
events |
private int |
feedletIndex |
private int |
sequenceNumber |
Constructor and Description |
---|
Feedlet(TraceEngine engine,
int feedletIndex)
Create a new Feedlet.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
acquireEventChunk() |
void |
addEvent(EventType et)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
double dval1)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
double dval1,
String sval1)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
int ival1)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
int[] idata,
long[] ldata,
double[] ddata,
String[] sdata)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
int ival1,
double dval1)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
int ival1,
int ival2)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
int ival1,
int ival2,
double dval1)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
int ival1,
int ival2,
int ival3)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
int ival1,
int ival2,
int ival3,
int ival4)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
long lval1)
Add an event to the feedlet's generated event stream
|
void |
addEvent(EventType et,
String sval1)
Add an event to the feedlet's generated event stream
|
private void |
addEventInternal(EventType et) |
private void |
addEventInternal(EventType et,
double dval1) |
private void |
addEventInternal(EventType et,
double dval1,
String sval1) |
private void |
addEventInternal(EventType et,
int ival1) |
private void |
addEventInternal(EventType et,
int[] idata,
long[] ldata,
double[] ddata,
String[] sdata) |
private void |
addEventInternal(EventType et,
int ival1,
double dval1) |
private void |
addEventInternal(EventType et,
int ival1,
int ival2) |
private void |
addEventInternal(EventType et,
int ival1,
int ival2,
double dval1) |
private void |
addEventInternal(EventType et,
int ival1,
int ival2,
int ival3) |
private void |
addEventInternal(EventType et,
int ival1,
int ival2,
int ival3,
int ival4) |
private void |
addEventInternal(EventType et,
long lval1) |
private void |
addEventInternal(EventType et,
String sval1) |
private boolean |
checkTypes(EventType et,
int numInts,
int numLongs,
int numDoubles,
int numStrings) |
private void |
flushEventChunk() |
(package private) int |
getFeedletIndex() |
private long |
getTimeStamp() |
(package private) void |
shutdown() |
private static final boolean CHECK_TYPES
private final TraceEngine engine
private final int feedletIndex
private int sequenceNumber
private EventChunk events
boolean enabled
Feedlet(TraceEngine engine, int feedletIndex)
engine
- the TraceEngine instance to which this feedlet is attached.feedletIndex
- the index to use for the Feedletint getFeedletIndex()
void shutdown()
public void addEvent(EventType et)
et
- The type of event to addprivate void addEventInternal(EventType et)
public void addEvent(EventType et, int ival1)
et
- The type of event to addival1
- The first int data valueprivate void addEventInternal(EventType et, int ival1)
public void addEvent(EventType et, int ival1, int ival2)
et
- The type of event to addival1
- The first int data valueival2
- The second int data valueprivate void addEventInternal(EventType et, int ival1, int ival2)
public void addEvent(EventType et, int ival1, int ival2, int ival3)
et
- The type of event to addival1
- The first int data valueival2
- The second int data valueival3
- The third int data valueprivate void addEventInternal(EventType et, int ival1, int ival2, int ival3)
public void addEvent(EventType et, int ival1, int ival2, int ival3, int ival4)
et
- The type of event to addival1
- The first int data valueival2
- The second int data valueival3
- The third int data valueival4
- The fourth int data valueprivate void addEventInternal(EventType et, int ival1, int ival2, int ival3, int ival4)
public void addEvent(EventType et, long lval1)
et
- The type of event to addlval1
- The first double data valueprivate void addEventInternal(EventType et, long lval1)
public void addEvent(EventType et, double dval1)
et
- The type of event to adddval1
- The first double data valueprivate void addEventInternal(EventType et, double dval1)
public void addEvent(EventType et, String sval1)
et
- The type of event to addsval1
- The first String data valueprivate void addEventInternal(EventType et, String sval1)
public void addEvent(EventType et, int ival1, double dval1)
et
- The type of event to addival1
- The first int data valuedval1
- The first double data valueprivate void addEventInternal(EventType et, int ival1, double dval1)
public void addEvent(EventType et, int ival1, int ival2, double dval1)
et
- The type of event to addival1
- The first int data valueival2
- The second int data valuedval1
- The first double data valueprivate void addEventInternal(EventType et, int ival1, int ival2, double dval1)
public void addEvent(EventType et, double dval1, String sval1)
et
- The type of event to adddval1
- The first double data valuesval1
- The first String data valueprivate void addEventInternal(EventType et, double dval1, String sval1)
public void addEvent(EventType et, int[] idata, long[] ldata, double[] ddata, String[] sdata)
et
- the event's typeidata
- an array of int data values (may be null if no such values for this event)ldata
- an array of long data values (may be null if no such values for this event)ddata
- an array of double data values (may be null if no such values for this event)sdata
- an array of String data values (may be null if no such values for this event)private void addEventInternal(EventType et, int[] idata, long[] ldata, double[] ddata, String[] sdata)
private boolean checkTypes(EventType et, int numInts, int numLongs, int numDoubles, int numStrings)
private long getTimeStamp()
private boolean acquireEventChunk()
private void flushEventChunk()