|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.adaptive.measurements.listeners.Listener
org.jikesrvm.adaptive.measurements.listeners.ContextListener
org.jikesrvm.adaptive.measurements.listeners.EdgeListener
public class EdgeListener
A EdgeListener defines a listener that computes a call graph edge from the call stack. After a parameterized number of edges are collected, it notifies its organizer that the threshold is reached. Defines update's interface. EdgeListener communicates with an organizer through a integer array, buffer. Each time this listener is called, it places a triple of integers in buffer that correspond to the callee, caller, and machine code offset of the call site
| Field Summary | |
|---|---|
private int[] |
buffer
buffer provides the communication channel between the listener and the organizer. |
protected static boolean |
DEBUG
|
private int |
desiredSamples
Number of samples to be taken before issuing callback to controller |
protected int |
samplesTaken
Number of samples taken so far |
protected int |
updateCalled
Number of times update is called |
| Constructor Summary | |
|---|---|
EdgeListener()
Constructor |
|
| Method Summary | |
|---|---|
(package private) int |
getTimesUpdateCalled()
|
void |
report()
report() noop |
void |
reset()
Reset (in preparation of starting a new sampling window) |
private void |
resetBuffer()
Reset the buffer |
void |
setBuffer(int[] buffer)
Setup buffer and buffer size. |
void |
update(Address sfp,
int whereFrom)
This method is called when a call stack edge needs to be sampled. |
| Methods inherited from class org.jikesrvm.adaptive.measurements.listeners.Listener |
|---|
activate, activateOrganizer, isActive, passivate, setOrganizer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final boolean DEBUG
private int[] buffer
private int desiredSamples
protected int samplesTaken
protected int updateCalled
| Constructor Detail |
|---|
public EdgeListener()
| Method Detail |
|---|
int getTimesUpdateCalled()
public void setBuffer(int[] buffer)
buffer - the allocated buffer to contain the samples, size should
be a muliple of 3
public final void update(Address sfp,
int whereFrom)
update in class ContextListenersfp - a pointer to the stack frame that corresponds to the callee of
the call graph edge that is to be sampled.whereFrom - Was this a yieldpoint in a PROLOGUE, BACKEDGE, or
EPILOGUE?public final void report()
report in class Listenerpublic void reset()
reset in class Listenerprivate void resetBuffer()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||