|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmtk.utility.statistics.Counter
org.mmtk.utility.statistics.EventCounter
public class EventCounter
This class implements a simple event counter (counting number events that occur for each phase).
| Field Summary | |
|---|---|
private long[] |
count
Instance variables |
private boolean |
running
|
protected long |
totalCount
|
| Fields inherited from class org.mmtk.utility.statistics.Counter |
|---|
complex |
| Constructor Summary | |
|---|---|
EventCounter(String name)
Constructor |
|
EventCounter(String name,
boolean start)
Constructor |
|
EventCounter(String name,
boolean start,
boolean mergephases)
Constructor |
|
| Method Summary | |
|---|---|
void |
inc()
Increment the event counter |
void |
inc(int value)
Increment the event counter by value |
(package private) void |
phaseChange(int oldPhase)
The phase has changed (from GC to mutator or mutator to GC). |
protected void |
printCount(int phase)
Print the value of this counter for the given phase. |
void |
printCurrent()
Print the current value for this counter (mid-phase) |
void |
printLast()
Print statistics for the most recent phase |
protected void |
printMax(boolean mutator)
Print the current maximum value for either the mutator or GC phase. |
protected void |
printMin(boolean mutator)
Print the current minimum value for either the mutator or GC phase. |
void |
printTotal()
Print the current total for this counter |
protected void |
printTotal(boolean mutator)
Print the current total for either the mutator or GC phase |
(package private) void |
printValue(long value)
Print the given value |
protected void |
start()
Start this counter |
protected void |
stop()
Stop this counter |
| Methods inherited from class org.mmtk.utility.statistics.Counter |
|---|
getName, getStart, isComplex, mergePhases |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final long[] count
protected long totalCount
private boolean running
| Constructor Detail |
|---|
public EventCounter(String name)
name - The name to be associated with this counter
public EventCounter(String name,
boolean start)
name - The name to be associated with this counterstart - True if this counter is to be implicitly started
when startAll() is called (otherwise the counter
must be explicitly started).
public EventCounter(String name,
boolean start,
boolean mergephases)
name - The name to be associated with this counterstart - True if this counter is to be implicitly started
when startAll() is called (otherwise the counter
must be explicitly started).mergephases - True if this counter does not separately
report GC and Mutator phases.| Method Detail |
|---|
public void inc()
public void inc(int value)
value
value - The amount by which the counter should be incremented.protected void start()
start in class Counterprotected void stop()
stop in class Countervoid phaseChange(int oldPhase)
phaseChange in class CounteroldPhase - The last phaseprotected final void printCount(int phase)
printCount in class Counterphase - The phase to be printedpublic final void printCurrent()
public final void printTotal()
printTotal in class Counterprotected final void printTotal(boolean mutator)
printTotal in class Countermutator - True if the total for the mutator phases is to be
printed (otherwise the total for the GC phases will be printed).protected final void printMin(boolean mutator)
printMin in class Countermutator - True if the minimum for the mutator phase is to be
printed (otherwise the minimum for the GC phase will be printed).protected final void printMax(boolean mutator)
printMax in class Countermutator - True if the maximum for the mutator phase is to be
printed (otherwise the maximum for the GC phase will be printed).void printValue(long value)
value - The value to be printedpublic void printLast()
printLast in class Counter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||