|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.adaptive.measurements.RuntimeMeasurements
public abstract class RuntimeMeasurements
RuntimeMeasurements manages listeners, decayable objects, and reportable objects.
A listener is installed by an organizer, and activated at thread switch time by Thread. Depending on the update method that the listener supports, it can be either a method, context, or a null listener. Currently we have different registries for different listeners. An alternative design is to have one register with where entries are tagged.
A decayable object implements the Decayable interface. Anyone can register a decayable object, The DecayOrganizer periodically decays all objects that have been registers.
A reportable object implements the Reportable interface, and is typically registered and used by the instrumentation subsystem. A Reporable can be reset and reported.
Field Summary | |
---|---|
private static ContextListener[] |
cbsContextListeners
context listeners that trigger on CBS call yieldpoints |
private static MethodListener[] |
cbsMethodListeners
method listeners that trigger on CBS Method yieldpoints |
(package private) static int |
decayEventCounter
Counts the number of decay events |
(package private) static Vector<Decayable> |
decayObjects
The currently registered decayable objects |
(package private) static Vector<Reportable> |
reportObjects
The currently registered reportable objects |
private static ContextListener[] |
timerContextListeners
listeners on timer ticks for contexts |
private static MethodListener[] |
timerMethodListeners
listeners on timer ticks for methods |
private static NullListener[] |
timerNullListeners
listeners on timer ticks for nulls |
Constructor Summary | |
---|---|
RuntimeMeasurements()
|
Method Summary | |
---|---|
static void |
boot()
Called when the VM is booting |
static void |
decayDecayableObjects()
Decay all registered decayable objects. |
static void |
installCBSContextListener(ContextListener s)
Install a context listener on CBS ticks |
static void |
installCBSMethodListener(MethodListener s)
Install a method listener on CBS ticks |
static void |
installTimerContextListener(ContextListener s)
Install a context listener on timer ticks |
static void |
installTimerMethodListener(MethodListener s)
Install a method listener on timer ticks |
static void |
installTimerNullListener(NullListener s)
Install a null listener on timer ticks |
static void |
registerDecayableObject(Decayable obj)
Register an object that should be decayed. |
static void |
registerReportableObject(Reportable obj)
Register an object that wants to have its report method called whenever RuntimeMeasurements.report is called |
static void |
report()
Report the current state of runtime measurements |
private static void |
reportReportableObjects()
Report to all registered reportable objects |
static void |
resetReportableObjects()
Reset to all registered reportable objects |
static void |
stop()
Stop the runtime measurement subsystem |
static void |
takeCBSCallSample(int whereFrom,
Address yieldpointServiceMethodFP)
Called from Thread.yieldpoint when it is time to take a CBS call sample. |
static void |
takeCBSMethodSample(int whereFrom,
Address yieldpointServiceMethodFP)
Called from Thread.yieldpoint when it is time to take a CBS method sample. |
static void |
takeTimerSample(int whereFrom,
Address yieldpointServiceMethodFP)
Called from Thread.yieldpoint every time it is invoked due to a timer interrupt. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static MethodListener[] timerMethodListeners
private static ContextListener[] timerContextListeners
private static NullListener[] timerNullListeners
private static MethodListener[] cbsMethodListeners
private static ContextListener[] cbsContextListeners
static Vector<Decayable> decayObjects
static int decayEventCounter
static Vector<Reportable> reportObjects
Constructor Detail |
---|
public RuntimeMeasurements()
Method Detail |
---|
public static void installTimerMethodListener(MethodListener s)
s
- method listener to be installedpublic static void installTimerContextListener(ContextListener s)
s
- context listener to be installedpublic static void installTimerNullListener(NullListener s)
s
- null listener to be installedpublic static void takeTimerSample(int whereFrom, Address yieldpointServiceMethodFP)
public static void installCBSMethodListener(MethodListener s)
s
- method listener to be installedpublic static void installCBSContextListener(ContextListener s)
s
- context listener to be installedpublic static void takeCBSMethodSample(int whereFrom, Address yieldpointServiceMethodFP)
public static void takeCBSCallSample(int whereFrom, Address yieldpointServiceMethodFP)
public static void registerDecayableObject(Decayable obj)
public static void decayDecayableObjects()
public static void registerReportableObject(Reportable obj)
public static void resetReportableObjects()
private static void reportReportableObjects()
public static void report()
public static void stop()
public static void boot()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |