|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.adaptive.measurements.instrumentation.ManagedCounterData org.jikesrvm.adaptive.measurements.instrumentation.StringEventCounterData
public class StringEventCounterData
A generic data object that maps strings to counters. The key method is "Instruction getCounterInstructionForEvent(String)" which, given a string, returns a counter instruction that increments the corresponding counter for that string.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jikesrvm.adaptive.measurements.instrumentation.ManagedCounterData |
---|
ManagedCounterData.Counter |
Field Summary | |
---|---|
(package private) String |
dataName
A string description of this data; |
(package private) static boolean |
DEBUG
|
(package private) int |
eventNumber
Used to keep track of how many counters have been used so far. |
protected Hashtable<String,Integer> |
stringToCounterMap
Map strings to a counter location |
Fields inherited from class org.jikesrvm.adaptive.measurements.instrumentation.ManagedCounterData |
---|
automaticallyGrowCounters, counterManager, handle, numCounters |
Constructor Summary | |
---|---|
StringEventCounterData(InstrumentedEventCounterManager manager,
String name)
Constructor |
Method Summary | |
---|---|
protected static String |
doubleToString(double num)
Convert a double to string with maximum precision. |
int |
getCounterIndexForString(String str)
For a given string, return the number of the counter associated with this string. |
Instruction |
getCounterInstructionForEvent(String event)
Given a string, find or create the counter associated and return and instruction to increment that counter. |
Instruction |
getCounterInstructionForEvent(String event,
double incrementValue)
Given a string, find or create the counter associated and return and instruction to increment that counter. |
int |
getOrCreateCounterIndexForString(String str)
For a given string, return the number of the counter associated with this string. |
void |
report()
Print a report at the end of execution |
void |
reset()
reset (clear) data set being gathered |
Methods inherited from class org.jikesrvm.adaptive.measurements.instrumentation.ManagedCounterData |
---|
automaticallyGrowCounters, createEventCounterInstruction, createEventCounterInstruction, getCounter, getCounterManager, getHandle, getNumCounters, initializeCounters, report, resizeCounters, setCounter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final boolean DEBUG
protected final Hashtable<String,Integer> stringToCounterMap
final String dataName
int eventNumber
Constructor Detail |
---|
StringEventCounterData(InstrumentedEventCounterManager manager, String name)
manager
- The manager that will provide the counter spaceMethod Detail |
---|
public Instruction getCounterInstructionForEvent(String event)
event
- The name of the event
public Instruction getCounterInstructionForEvent(String event, double incrementValue)
event
- The name of the eventincrementValue
- The value to add to counter
protected static String doubleToString(double num)
num
- double to convertpublic void report()
report
in interface Reportable
public int getOrCreateCounterIndexForString(String str)
str
- The string for which you want the counter number
public int getCounterIndexForString(String str)
str
- The string for which you want the counter number
public void reset()
Reportable
reset
in interface Reportable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |