org.mmtk.utility.statistics
Class PerfCounter

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

public class PerfCounter
extends LongCounter

This class implements a simple performance counter, used to gather data from hardware performance counters.


Field Summary
 
Fields inherited from class org.mmtk.utility.statistics.LongCounter
totalCount
 
Fields inherited from class org.mmtk.utility.statistics.Counter
complex
 
Constructor Summary
PerfCounter(String name)
          Constructor
PerfCounter(String name, boolean start)
          Constructor
PerfCounter(String name, boolean start, boolean gconly)
          Constructor
 
Method Summary
protected  long getCurrentValue()
          Get the current value for this counter
 
Methods inherited from class org.mmtk.utility.statistics.LongCounter
getLastTotal, phaseChange, printCount, printMax, printMin, printTotal, printTotal, printValue, 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
 

Constructor Detail

PerfCounter

public PerfCounter(String name)
Constructor

Parameters:
name - The name to be associated with this counter

PerfCounter

public PerfCounter(String name,
                   boolean start)
Constructor

Parameters:
name - The name to be associated with this counter
start - True if this counter is to be implicitly started at boot time (otherwise the counter must be explicitly started).

PerfCounter

public PerfCounter(String name,
                   boolean start,
                   boolean gconly)
Constructor

Parameters:
name - The name to be associated with this counter
start - True if this counter is to be implicitly started at boot time (otherwise the counter must be explicitly started).
gconly - True if this counter only pertains to (and therefore functions during) GC phases.
Method Detail

getCurrentValue

protected final long getCurrentValue()
Get the current value for this counter

Specified by:
getCurrentValue in class LongCounter
Returns:
The current value for this counter