org.jikesrvm.mm.mmtk
Class Statistics

java.lang.Object
  extended by org.mmtk.vm.Statistics
      extended by org.jikesrvm.mm.mmtk.Statistics
All Implemented Interfaces:
Constants

public final class Statistics
extends Statistics
implements Constants


Field Summary
private  PerfEvent[] perfEvents
           
 
Fields inherited from interface org.mmtk.utility.Constants
ALIGNMENT_VALUE, ARRAY_ELEMENT, BITS_IN_ADDRESS, BITS_IN_BYTE, BITS_IN_CHAR, BITS_IN_INT, BITS_IN_PAGE, BITS_IN_SHORT, BITS_IN_WORD, BYTES_IN_ADDRESS, BYTES_IN_BYTE, BYTES_IN_CHAR, BYTES_IN_INT, BYTES_IN_KBYTE, BYTES_IN_MBYTE, BYTES_IN_PAGE, BYTES_IN_SHORT, BYTES_IN_WORD, CARD_MASK, CARD_META_PAGES_PER_REGION, INSTANCE_FIELD, LOG_BITS_IN_ADDRESS, LOG_BITS_IN_BYTE, LOG_BITS_IN_CHAR, LOG_BITS_IN_INT, LOG_BITS_IN_PAGE, LOG_BITS_IN_SHORT, LOG_BITS_IN_WORD, LOG_BYTES_IN_ADDRESS, LOG_BYTES_IN_ADDRESS_SPACE, LOG_BYTES_IN_BYTE, LOG_BYTES_IN_CHAR, LOG_BYTES_IN_INT, LOG_BYTES_IN_KBYTE, LOG_BYTES_IN_MBYTE, LOG_BYTES_IN_PAGE, LOG_BYTES_IN_SHORT, LOG_BYTES_IN_WORD, LOG_CARD_BYTES, LOG_CARD_GRAIN, LOG_CARD_META_BYTES, LOG_CARD_META_PAGES, LOG_CARD_META_SIZE, LOG_CARD_UNITS, LOG_MIN_ALIGNMENT, MAX_ALIGNMENT, MAX_BYTES_PADDING, MAX_INT, MIN_ALIGNMENT, MIN_INT, SUPPORT_CARD_SCANNING
 
Constructor Summary
Statistics()
           
 
Method Summary
 long cycles()
          Read a cycle counter (high resolution, non-monotonic clock).
 int getCollectionCount()
          Returns the number of collections that have occurred.
 long millisToNanos(double t)
          Convert milliseconds to nanoseconds
 double nanosToMillis(long c)
          Convert nanoseconds to milliseconds
 double nanosToSecs(long c)
          Convert nanoseconds to seconds
 long nanoTime()
          Read nanoTime (high resolution, monotonically increasing clock).
 void perfEventInit(String events)
          Initialize performance events
 void perfEventRead(int id, long[] values)
          Read a performance event
 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
 

Field Detail

perfEvents

private PerfEvent[] perfEvents
Constructor Detail

Statistics

public Statistics()
Method Detail

getCollectionCount

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

Specified by:
getCollectionCount in class Statistics
Returns:
The number of collections that have occurred.

nanoTime

public long nanoTime()
Read nanoTime (high resolution, monotonically increasing clock). Has same semantics as java.lang.System.nanoTime().

Specified by:
nanoTime in class Statistics

cycles

public long cycles()
Read a cycle counter (high resolution, non-monotonic clock). This method should be used with care as the cycle counters (especially on IA32 SMP machines) are not a reliably time source.

Specified by:
cycles in class Statistics

nanosToMillis

public double nanosToMillis(long c)
Convert nanoseconds to milliseconds

Specified by:
nanosToMillis in class Statistics

nanosToSecs

public double nanosToSecs(long c)
Convert nanoseconds to seconds

Specified by:
nanosToSecs in class Statistics

millisToNanos

public long millisToNanos(double t)
Convert milliseconds to nanoseconds

Specified by:
millisToNanos in class Statistics

secsToNanos

public long secsToNanos(double t)
Convert seconds to nanoseconds

Specified by:
secsToNanos in class Statistics

perfEventInit

public void perfEventInit(String events)
Initialize performance events

Specified by:
perfEventInit in class Statistics

perfEventRead

public void perfEventRead(int id,
                          long[] values)
Read a performance event

Specified by:
perfEventRead in class Statistics