|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.monitors.StackMonitor.Monitor
The Monitor class implements a monitor for the stack height that inserts a probe after
every instruction in the program and checks the stack height after each instruction is executed.
| Field Summary | |
ProgramProfiler |
profile
|
Program |
program
|
Simulator |
simulator
|
| Method Summary | |
void |
fireAfter(Instr i,
int address,
State s)
The fireAfter() method is called after the probed instruction executes. |
void |
fireBefore(Instr i,
int address,
State s)
The fireBefore() method is called before the probed instruction executes. |
void |
report()
The report() method generates a textual report after the simulation is complete. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final Simulator simulator
public final Program program
public final ProgramProfiler profile
| Method Detail |
public void fireBefore(Instr i,
int address,
State s)
Simulator.ProbefireBefore() method is called before the probed instruction executes.
fireBefore in interface Simulator.Probei - the instruction being probedaddress - the address at which this instruction residess - the state of the simulation
public void fireAfter(Instr i,
int address,
State s)
Simulator.ProbefireAfter() method is called after the probed instruction executes.
fireAfter in interface Simulator.Probei - the instruction being probedaddress - the address at which this instruction residess - the state of the simulationpublic void report()
report() method generates a textual report after the simulation is complete. The
text report contains the 3 smallest stack pointers encountered (tracking all three is necessary
because the stack pointer begins at 0 and then is initialized one byte at a time).
report in interface Monitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||