OpenASIP
2.0
|
#include <ExecutionTracker.hh>
Public Member Functions | |
ExecutionTracker (TTASimulationController &subject, ExecutionTrace &traceDB) | |
virtual | ~ExecutionTracker () |
virtual void | handleEvent () |
Public Member Functions inherited from Listener | |
Listener () | |
virtual | ~Listener () |
virtual void | handleEvent (int event) |
Private Attributes | |
TTASimulationController & | subject_ |
the tracked SimulationController instance More... | |
ExecutionTrace & | traceDB_ |
the trace database to store the trace to More... | |
Tracks the simulation execution.
Stores execution data in execution trace.
Definition at line 46 of file ExecutionTracker.hh.
ExecutionTracker::ExecutionTracker | ( | TTASimulationController & | subject, |
ExecutionTrace & | traceDB | ||
) |
Constructor.
subject | The SimulationController which is observed. |
traceDB | The Execution Trace Database instance in which the trace is stored. Expects that the database is open for writing. |
Definition at line 49 of file ExecutionTracker.cc.
References SimulatorFrontend::eventHandler(), TTASimulationController::frontend(), Informer::registerListener(), and SimulationEventHandler::SE_CYCLE_END.
|
virtual |
Destructor.
Definition at line 60 of file ExecutionTracker.cc.
References SimulatorFrontend::eventHandler(), TTASimulationController::frontend(), SimulationEventHandler::SE_CYCLE_END, subject_, and Informer::unregisterListener().
|
virtual |
Stores instruction execution data in the trace database.
If any error happens while writing the data, aborts program with an error message.
Reimplemented from Listener.
Definition at line 72 of file ExecutionTracker.cc.
References ExecutionTrace::addInstructionExecution(), TTASimulationController::clockCount(), debugLog, Exception::errorMessage(), TTASimulationController::lastExecutedInstruction(), subject_, and traceDB_.
|
private |
the tracked SimulationController instance
Definition at line 57 of file ExecutionTracker.hh.
Referenced by handleEvent(), and ~ExecutionTracker().
|
private |
the trace database to store the trace to
Definition at line 59 of file ExecutionTracker.hh.
Referenced by handleEvent().