ecos: minor changes, cleanup
- Count experiments, not jobs - Debug output Change-Id: Ide5e1219cdcc8112d1a0d4e7367beca2dd5821ef
This commit is contained in:
committed by
Gerrit Code Review
parent
c0b36f6236
commit
403886e541
@ -27,7 +27,7 @@
|
|||||||
#define LOCAL 0
|
#define LOCAL 0
|
||||||
|
|
||||||
#ifndef PREREQUISITES
|
#ifndef PREREQUISITES
|
||||||
#define PREREQUISITES 0 // 1: do step 0-2 ; 0: do step 3
|
#error Configure experimentInfo.hpp properly!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// create/use multiple snapshots to speed up long experiments
|
// create/use multiple snapshots to speed up long experiments
|
||||||
@ -285,7 +285,8 @@ bool EcosKernelTestExperiment::faultInjection() {
|
|||||||
BPSingleListener bp;
|
BPSingleListener bp;
|
||||||
|
|
||||||
#if !LOCAL
|
#if !LOCAL
|
||||||
for (int i = 0; i < 50 || (m_jc.getNumberOfUndoneJobs() != 0) ; ++i) { // only do 50 sequential experiments, to prevent swapping
|
for (int experiments = 0;
|
||||||
|
experiments < 500 || (m_jc.getNumberOfUndoneJobs() != 0); ) { // stop after ~500 experiments to prevent swapping
|
||||||
// 50 exp ~ 0.5GB RAM usage per instance (linearly increasing)
|
// 50 exp ~ 0.5GB RAM usage per instance (linearly increasing)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -340,6 +341,8 @@ bool EcosKernelTestExperiment::faultInjection() {
|
|||||||
// for each job with the SINGLEBITFLIP fault model we're actually doing *8*
|
// for each job with the SINGLEBITFLIP fault model we're actually doing *8*
|
||||||
// experiments (one for each bit)
|
// experiments (one for each bit)
|
||||||
for (int bit_offset = 0; bit_offset < 8; ++bit_offset) {
|
for (int bit_offset = 0; bit_offset < 8; ++bit_offset) {
|
||||||
|
++experiments;
|
||||||
|
|
||||||
// 8 results in one job
|
// 8 results in one job
|
||||||
EcosKernelTestProtoMsg_Result *result = param.msg.add_result();
|
EcosKernelTestProtoMsg_Result *result = param.msg.add_result();
|
||||||
result->set_bit_offset(bit_offset);
|
result->set_bit_offset(bit_offset);
|
||||||
@ -409,6 +412,9 @@ bool EcosKernelTestExperiment::faultInjection() {
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (param.msg.has_instr2_address()) {
|
||||||
|
log << "Absolute IP sanity check OK" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
// --- aftermath ---
|
// --- aftermath ---
|
||||||
// possible outcomes:
|
// possible outcomes:
|
||||||
@ -664,7 +670,7 @@ bool EcosKernelTestExperiment::run()
|
|||||||
parseOptions();
|
parseOptions();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PREREQUISITES
|
#if PREREQUISITES
|
||||||
log << "retrieving ELF symbol addresses ..." << endl;
|
log << "retrieving ELF symbol addresses ..." << endl;
|
||||||
guest_address_t entry, finish, test_output, errors_corrected,
|
guest_address_t entry, finish, test_output, errors_corrected,
|
||||||
panic, text_start, text_end;
|
panic, text_start, text_end;
|
||||||
@ -681,19 +687,19 @@ bool EcosKernelTestExperiment::run()
|
|||||||
} else { return false; }
|
} else { return false; }
|
||||||
|
|
||||||
// step 1
|
// step 1
|
||||||
if(establishState(entry, finish, errors_corrected)) {
|
if (establishState(entry, finish, errors_corrected)) {
|
||||||
log << "STEP 1 finished: proceeding ..." << endl;
|
log << "STEP 1 finished: proceeding ..." << endl;
|
||||||
} else { return false; }
|
} else { return false; }
|
||||||
|
|
||||||
// step 2
|
// step 2
|
||||||
if(performTrace(entry, finish)) {
|
if (performTrace(entry, finish)) {
|
||||||
log << "STEP 2 finished: terminating ..." << endl;
|
log << "STEP 2 finished: terminating ..." << endl;
|
||||||
} else { return false; }
|
} else { return false; }
|
||||||
|
|
||||||
#else // !PREREQUISITES
|
#else // !PREREQUISITES
|
||||||
// step 3
|
// step 3
|
||||||
faultInjection();
|
faultInjection();
|
||||||
#endif // PREREQUISITES
|
#endif // PREREQUISITES
|
||||||
|
|
||||||
// Explicitly terminate, or the simulator will continue to run.
|
// Explicitly terminate, or the simulator will continue to run.
|
||||||
simulator.terminate();
|
simulator.terminate();
|
||||||
|
|||||||
Reference in New Issue
Block a user