- All Implemented Interfaces:
- public class Counter
- extends Simulator.Probe.Empty
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.
count field stores the accumulation of all events received by this counter.
fireBefore() method is called before the probed instruction executes.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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.
public void fireBefore(State state,
fireBefore() method is called before the probed instruction executes. In the
implementation of the counter, it simply updates the internal counter.
- Specified by:
fireBefore in interface
fireBefore in class
state - the state of the simulation
pc - the address at which this instruction resides