org.mmtk.utility.statistics
Class PerfEvent

java.lang.Object
  extended by org.mmtk.utility.statistics.Counter
      extended by org.mmtk.utility.statistics.LongCounter
          extended by org.mmtk.utility.statistics.PerfEvent

public final class PerfEvent
extends LongCounter

This class represents a perf event, such as cache misses, etc.


Field Summary
private  boolean contended
          true if the counter did not run due to contention for a physical counter
static boolean dataWasScaled
          true if any data was scaled
private  int index
          The index of the counter in the native array
private  boolean overflowed
          true if the counter overflowed
private  long previousValue
          The previously read value of the counter (used to detect overflow)
private static int RAW_COUNT
           
private  long[] readBuffer
          A buffer passed to the native code when reading values, returns the tuple RAW_COUNT, TIME_ENABLED, TIME_RUNNING
private  boolean scaled
          true if the counter did not run all of the time and has been scaled appropriately
private static int TIME_ENABLED
           
private static int TIME_RUNNING
           
 
Fields inherited from class org.mmtk.utility.statistics.LongCounter
totalCount
 
Fields inherited from class org.mmtk.utility.statistics.Counter
complex
 
Constructor Summary
PerfEvent(int index, String name)
           
 
Method Summary
 String getColumnSuffix()
          Return the (option) suffix to be used when reporting this counter
protected  long getCurrentValue()
          Counters are 64 bit unsigned in the kernel but only 63 bits are available in Java
(package private)  void printValue(long value)
          Print the given value
 
Methods inherited from class org.mmtk.utility.statistics.LongCounter
getLastTotal, phaseChange, printCount, printMax, printMin, printTotal, printTotal, start, stop
 
Methods inherited from class org.mmtk.utility.statistics.Counter
getName, getStart, isComplex, mergePhases, printLast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contended

private boolean contended
true if the counter did not run due to contention for a physical counter


scaled

private boolean scaled
true if the counter did not run all of the time and has been scaled appropriately


overflowed

private boolean overflowed
true if the counter overflowed


index

private int index
The index of the counter in the native array


previousValue

private long previousValue
The previously read value of the counter (used to detect overflow)


readBuffer

private final long[] readBuffer
A buffer passed to the native code when reading values, returns the tuple RAW_COUNT, TIME_ENABLED, TIME_RUNNING


RAW_COUNT

private static final int RAW_COUNT
See Also:
Constant Field Values

TIME_ENABLED

private static final int TIME_ENABLED
See Also:
Constant Field Values

TIME_RUNNING

private static final int TIME_RUNNING
See Also:
Constant Field Values

dataWasScaled

public static boolean dataWasScaled
true if any data was scaled

Constructor Detail

PerfEvent

public PerfEvent(int index,
                 String name)
Method Detail

getCurrentValue

protected long getCurrentValue()
Counters are 64 bit unsigned in the kernel but only 63 bits are available in Java

Specified by:
getCurrentValue in class LongCounter

printValue

void printValue(long value)
Description copied from class: LongCounter
Print the given value

Overrides:
printValue in class LongCounter
Parameters:
value - The value to be printed

getColumnSuffix

public String getColumnSuffix()
Description copied from class: Counter
Return the (option) suffix to be used when reporting this counter

Overrides:
getColumnSuffix in class Counter
Returns:
The suffix