GenericExperiment: record output during complete runtime
Before this change, the GenericExperiment only recorded port 0xe9 output *after* the fault was injected. When a fault was injected during the workload's output loop, the output data before that point in time was missing, and the experiment outcome was wrongly classified as SDC. This change moves the logging activation to before the fast-forwarding step (DatabaseExperiment::cb_before_fast_forward). It also makes sure the DatabaseExperiment only clears its own listeners instead of also touching the SerialOutputLogger's one. Change-Id: I66bda4ee318d271ddda6f7ade4e817bf9d14cf46
This commit is contained in:
@ -120,7 +120,7 @@ bool DatabaseExperiment::run()
|
||||
|
||||
m_log << "Trying to inject @ instr #" << dec << injection_instr << endl;
|
||||
|
||||
simulator.clearListeners();
|
||||
simulator.clearListeners(this);
|
||||
|
||||
if (!this->cb_before_fast_forward()) {
|
||||
continue;
|
||||
@ -168,7 +168,7 @@ bool DatabaseExperiment::run()
|
||||
simulator.terminate(1);
|
||||
}
|
||||
|
||||
simulator.clearListeners();
|
||||
simulator.clearListeners(this);
|
||||
|
||||
if (fsppilot->inject_bursts()) {
|
||||
/// INJECT BURST:
|
||||
@ -194,7 +194,7 @@ bool DatabaseExperiment::run()
|
||||
m_log << "Resume done" << std::endl;
|
||||
this->cb_after_resume(listener);
|
||||
|
||||
simulator.clearListeners();
|
||||
simulator.clearListeners(this);
|
||||
}
|
||||
m_jc->sendResult(*param);
|
||||
this->cb_free_experiment_data(param);
|
||||
|
||||
@ -243,6 +243,15 @@ bool GenericExperiment::cb_start_experiment() {
|
||||
}
|
||||
|
||||
|
||||
bool GenericExperiment::cb_before_fast_forward()
|
||||
{
|
||||
if (enabled_e9_sol) {
|
||||
// output may already appear *before* FI
|
||||
simulator.addFlow(&e9_sol);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GenericExperiment::cb_before_resume() {
|
||||
if (enabled_trap)
|
||||
simulator.addListener(&l_trap);
|
||||
@ -263,10 +272,6 @@ bool GenericExperiment::cb_before_resume() {
|
||||
simulator.addListener(*it);
|
||||
}
|
||||
|
||||
if (enabled_e9_sol) {
|
||||
simulator.addFlow(&e9_sol);
|
||||
}
|
||||
|
||||
return true; // everything OK
|
||||
}
|
||||
|
||||
|
||||
@ -98,6 +98,14 @@ public:
|
||||
*/
|
||||
virtual bool cb_start_experiment();
|
||||
|
||||
/**
|
||||
* Callback that is called before the fast forward is done. This
|
||||
* can be used to add additional event listeners during the fast
|
||||
* forward phase. If returning false, the experiment is canceled.
|
||||
* @return \c true on success, \c false otherwise
|
||||
*/
|
||||
virtual bool cb_before_fast_forward();
|
||||
|
||||
/**
|
||||
* Callback that is called before the resuming till crash has
|
||||
* started. This is called after the fault was injected. Here the
|
||||
|
||||
Reference in New Issue
Block a user