org.jikesrvm.adaptive.measurements.listeners
Class CallDensityListener
java.lang.Object
org.jikesrvm.adaptive.measurements.listeners.Listener
org.jikesrvm.adaptive.measurements.listeners.NullListener
org.jikesrvm.adaptive.measurements.listeners.CallDensityListener
public final class CallDensityListener
- extends NullListener
A simple listener to accumulate counts of total events
and the fraction of those events that occured at loop backedges.
In effect, this provides a mechanism for estimating the
call density of the program. If most yieldpoints are being taken at
backedges, then call density is low.
|
Method Summary |
double |
callDensity()
|
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 |
numSamples
private double numSamples
numBackedgeSamples
private double numBackedgeSamples
CallDensityListener
public CallDensityListener()
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?
callDensity
public double callDensity()
reset
public void reset()
- Description copied from class:
Listener
- reset the listeners data structures
- Specified by:
reset in class Listener
report
public void report()
- Description copied from class:
Listener
- Entry point to dump what has been collected.
- Specified by:
report in class Listener