Experiments need to cleanup residual events on exit. Empty MemAccessTracingTest-dir removed.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1245 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-05-17 17:02:13 +00:00
parent 34fbb932fd
commit ab4528c036
13 changed files with 33 additions and 12 deletions

View File

@ -136,5 +136,7 @@ bool FaultCoverageExperiment::run()
}
}
}
return (true);
simulator.clearEvents(this);
return true;
}

View File

@ -36,6 +36,7 @@ bool MHTestExperiment::run()
cout << "No data for me? :(" << endl;
}
#endif
sal::simulator.clearEvents(this);
sal::simulator.terminate();
return true;
}

View File

@ -73,6 +73,7 @@ bool TracingTest::run()
*/
#endif
cout << "[TracingTest] Finished." << endl;
simulator.clearEvents(this);
simulator.terminate();
return true;

View File

@ -31,6 +31,7 @@ bool DataRetrievalExperiment::run()
cout << "m_instrptr1: " << hex << test->m_instrptr1() << endl;
// m_instrptr2 augeben
cout << "m_instrptr2: " << hex << test->m_instrptr2() << endl;
return (true); // experiment successful
sal::simulator.clearEvents(this);
return true; // experiment successful
}

View File

@ -37,7 +37,8 @@ class JumpAndRunExperiment : public fi::ExperimentFlow
{
cerr << "[JumpAndRunExperiment] Now, we are completely lost! "
<< "It's time to cry! :-(" << endl;
return (false);
simulator.clearEvents(this);
return false;
}
else
cout << "[JumpAndRunExperiment] Entry of main function reached! "
@ -58,7 +59,8 @@ class JumpAndRunExperiment : public fi::ExperimentFlow
{
cerr << "[JumpAndRunExperiment] Damn! Something went "
<< "terribly wrong! Who added that event?! :-(" << endl;
return (false);
simulator.clearEvents(this);
return false;
}
else
cout << "[JumpAndRunExperiment] Jump detected. Instruction: "
@ -73,7 +75,9 @@ class JumpAndRunExperiment : public fi::ExperimentFlow
cout << "[JumpAndRunExperiment] " << dec << counter
<< " jump(s) detected -- enough for today...exiting! :-)"
<< endl;
return (true);
simulator.clearEvents(this);
return true;
}
};

View File

@ -68,7 +68,8 @@ class MemWriteExperiment : public ExperimentFlow
// 4. Continue simulation (waitAny) and inject bitflip:
// ...
return (true);
simulator.clearEvents(this);
return true;
}
};

View File

@ -57,7 +57,9 @@ class MyExperiment : public fi::ExperimentFlow
<< " next 400 instructions..."; cout.flush();
simulator.addEventAndWait(&foobar);
cout << "cought! Exiting now." << endl;
return (true);
simulator.clearEvents(this);
return true;
}
};

View File

@ -39,7 +39,8 @@ class SingleSteppingExperiment : public fi::ExperimentFlow
{
cerr << "[SingleSteppingExperiment] Now, we are completely lost!"
<< " It's time to cry! :-(" << endl;
return (false);
simulator.clearEvents(this);
return false;
}
cout << "[SingleSteppingExperiment] Entry of main function reached!"
<< " Beginning single-stepping..." << endl;
@ -57,7 +58,9 @@ class SingleSteppingExperiment : public fi::ExperimentFlow
if(action != 'y')
break;
}
return (true);
simulator.clearEvents(this);
return true;
}
};

View File

@ -98,6 +98,7 @@ bool ChecksumOOStuBSExperiment::run()
std::ofstream of(tracefile);
if (of.fail()) {
log << "failed to write " << tracefile << endl;
sal::simulator.clearEvents(this);
return false;
}
trace.SerializeToOstream(&of);

View File

@ -93,6 +93,7 @@ bool CoolChecksumExperiment::run()
std::ofstream of("trace.pb");
if (of.fail()) {
log << "failed to write trace.pb" << endl;
sal::simulator.clearEvents(this);
return false;
}
trace.SerializeToOstream(&of);
@ -114,7 +115,7 @@ bool CoolChecksumExperiment::run()
if (!m_jc.getParam(param)) {
log << "Dying." << endl;
// communicate that we were told to die
sal::simulator.terminate(1); // "return (false);" ?
sal::simulator.terminate(1);
}
int id = param.getWorkloadID();
int instr_offset = param.msg.instr_offset();
@ -201,5 +202,6 @@ bool CoolChecksumExperiment::run()
sal::simulator.terminate();
#endif
// simulator continues to run
sal::simulator.clearEvents(this);
return true;
}

View File

@ -42,5 +42,6 @@ bool fireinterruptExperiment::run()
#endif
sal::simulator.clearEvents(this);
return true;
}

View File

@ -52,6 +52,7 @@ bool hscsimpleExperiment::run()
sal::simulator.addEventAndWait(&breakpoint);
#endif
sal::simulator.clearEvents(this);
return true;
}

View File

@ -98,6 +98,7 @@ bool WeathermonitorExperiment::run()
std::ofstream of(tracefile);
if (of.fail()) {
log << "failed to write " << tracefile << endl;
sal::simulator.clearEvents(this); // cleanup
return false;
}
trace.SerializeToOstream(&of);