avrora.sim.util
Class MemoryProfiler

java.lang.Object
  extended byavrora.sim.Simulator.Watch.Empty
      extended byavrora.sim.util.MemoryProfiler
All Implemented Interfaces:
Simulator.Watch

public class MemoryProfiler
extends Simulator.Watch.Empty


Nested Class Summary
 
Nested classes inherited from class avrora.sim.Simulator.Watch
Simulator.Watch.Empty
 
Field Summary
 long[] rcount
           
 long[] wcount
           
 
Constructor Summary
MemoryProfiler(int size)
           
 
Method Summary
 void fireBeforeRead(State state, int data_addr)
          The fireBeforeRead() method is called before the data address is read by the program.
 void fireBeforeWrite(State state, int data_addr, byte value)
          The fireBeforeWrite() method is called before the data address is written by the program.
 
Methods inherited from class avrora.sim.Simulator.Watch.Empty
fireAfterRead, fireAfterWrite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rcount

public final long[] rcount

wcount

public final long[] wcount
Constructor Detail

MemoryProfiler

public MemoryProfiler(int size)
Method Detail

fireBeforeRead

public void fireBeforeRead(State state,
                           int data_addr)
Description copied from class: Simulator.Watch.Empty
The fireBeforeRead() method is called before the data address is read by the program. In the implementation of the Empty watch, this method does nothing.

Specified by:
fireBeforeRead in interface Simulator.Watch
Overrides:
fireBeforeRead in class Simulator.Watch.Empty
Parameters:
state - the state of the simulation
data_addr - the address of the data being referenced

fireBeforeWrite

public void fireBeforeWrite(State state,
                            int data_addr,
                            byte value)
Description copied from class: Simulator.Watch.Empty
The fireBeforeWrite() method is called before the data address is written by the program. In the implementation of the Empty watch, this method does nothing.

Specified by:
fireBeforeWrite in interface Simulator.Watch
Overrides:
fireBeforeWrite in class Simulator.Watch.Empty
Parameters:
state - the state of the simulation
data_addr - the address of the data being referenced
value - the value being written to the memory location