|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.sim.Simulator.Probe.Empty avrora.sim.util.Counter
The Counter
class is a utility for profiling programs. It simply increments an internal
counter every time the probe fires. This very simple type of probe can be used for profiling counts of
basic blocks, interrupt routines, particular methods, inner loops, or even to count the total number of
instructions executed in the program.
Nested Class Summary |
Nested classes inherited from class avrora.sim.Simulator.Probe |
Simulator.Probe.Empty |
Field Summary | |
long |
count
The count field stores the accumulation of all events received by this counter. |
Constructor Summary | |
Counter()
|
Method Summary | |
void |
fireBefore(State state,
int pc)
The fireBefore() method is called before the probed instruction executes. |
Methods inherited from class avrora.sim.Simulator.Probe.Empty |
fireAfter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public long count
count
field stores the accumulation of all events received by this counter. This field
is incremented once each time the fireBefore()
method is invoked.
Constructor Detail |
public Counter()
Method Detail |
public void fireBefore(State state, int pc)
fireBefore()
method is called before the probed instruction executes. In the
implementation of the counter, it simply updates the internal counter.
fireBefore
in interface Simulator.Probe
fireBefore
in class Simulator.Probe.Empty
state
- the state of the simulationpc
- the address at which this instruction resides
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |