org.mmtk.vm
Class Statistics

java.lang.Object
  extended by org.mmtk.vm.Statistics
Direct Known Subclasses:
Statistics

public abstract class Statistics
extends Object


Constructor Summary
Statistics()
           
 
Method Summary
abstract  long cycles()
          Read the cycle counter
abstract  int getCollectionCount()
          Returns the number of collections that have occurred.
abstract  long millisToNanos(double t)
          Convert milliseconds to nanoseconds
abstract  double nanosToMillis(long c)
          Convert nanoseconds to milliseconds
abstract  double nanosToSecs(long c)
          Convert nanoseconds to seconds
abstract  long nanoTime()
          Read cycle counter
abstract  void perfCtrInit(int metric)
          Initialize performance counters
abstract  long perfCtrReadCycles()
          Read the current cycle count from the perfctr libraries
abstract  long perfCtrReadMetric()
          Read the current event count for the metric being measured by the perfctr libraries
abstract  long secsToNanos(double t)
          Convert seconds to nanoseconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statistics

public Statistics()
Method Detail

getCollectionCount

public abstract int getCollectionCount()
Returns the number of collections that have occurred.

Returns:
The number of collections that have occurred.

nanoTime

public abstract long nanoTime()
Read cycle counter


nanosToMillis

public abstract double nanosToMillis(long c)
Convert nanoseconds to milliseconds


nanosToSecs

public abstract double nanosToSecs(long c)
Convert nanoseconds to seconds


millisToNanos

public abstract long millisToNanos(double t)
Convert milliseconds to nanoseconds


secsToNanos

public abstract long secsToNanos(double t)
Convert seconds to nanoseconds


cycles

public abstract long cycles()
Read the cycle counter


perfCtrInit

public abstract void perfCtrInit(int metric)
Initialize performance counters

Parameters:
metric - An integer identifying the metric being read

perfCtrReadCycles

public abstract long perfCtrReadCycles()
Read the current cycle count from the perfctr libraries

Returns:
the current cycle count from the perfctr libraries

perfCtrReadMetric

public abstract long perfCtrReadMetric()
Read the current event count for the metric being measured by the perfctr libraries

Returns:
the current event count for the metric being measured by the perfctr libraries