org.jikesrvm.adaptive.measurements.listeners
Class YieldCounterListener
java.lang.Object
org.jikesrvm.adaptive.measurements.listeners.Listener
org.jikesrvm.adaptive.measurements.listeners.NullListener
org.jikesrvm.adaptive.measurements.listeners.YieldCounterListener
public final class YieldCounterListener
- extends NullListener
A YieldCounterListener samples yield points, and
notifies an Organizer when a threshold is reached.
In effect, this class provides a way to "wake up" an infrequent
service periodically.
|
Method Summary |
void |
report()
Entry point to dump what has been collected. |
void |
reset()
reset the listeners data structures |
void |
update(int whereFrom)
This method is called when its time to record that a
yield point has occurred. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
yieldThreshold
private int yieldThreshold
numYields
private int numYields
totalYields
private int totalYields
YieldCounterListener
public YieldCounterListener(int yieldThreshold)
- Constructor
- Parameters:
yieldThreshold - the threshold of when to call organizer
update
public void update(int whereFrom)
- This method is called when its time to record that a
yield point has occurred.
- Specified by:
update in class NullListener
- Parameters:
whereFrom - Was this a yieldpoint in a PROLOGUE, BACKEDGE, or
EPILOGUE?
report
public void report()
- Description copied from class:
Listener
- Entry point to dump what has been collected.
- Specified by:
report in class Listener
reset
public void reset()
- Description copied from class:
Listener
- reset the listeners data structures
- Specified by:
reset in class Listener