wmoo: wait n + m loop iterations, determine #instr from golden run

n=WEATHER_NUMITER_TRACING
 - iterations that are traced (= fault-space width)
 - yields #instructions to that point in the golden run
 -> WEATHER_NUMINSTR_TRACING
m=WEATHER_NUMITER_AFTER
 - iterations for observation afterwards (everything continuing OK?)
 - yields additional #instructions for that second part
 -> WEATHER_NUMINSTR_AFTER

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1102 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-04-18 14:19:08 +00:00
parent d96d3c4c5b
commit f468a197f9
3 changed files with 61 additions and 23 deletions

View File

@ -74,21 +74,23 @@ bool WeathermonitorExperiment::run()
// this must be done *after* configuring the plugin:
sal::simulator.addFlow(&tp);
bp.setWatchInstructionPointer(fi::ANY_ADDR);
bp.setCounter(WEATHER_NUMINSTR);
// trace WEATHER_NUMITER_TRACING measurement loop iterations
bp.setWatchInstructionPointer(WEATHER_FUNC_WAIT_END);
bp.setCounter(WEATHER_NUMITER_TRACING);
sal::simulator.addEvent(&bp);
fi::BPEvent func_temp_measure(WEATHER_FUNC_TEMP_MEASURE);
sal::simulator.addEvent(&func_temp_measure);
fi::BPEvent ev_count(fi::ANY_ADDR);
sal::simulator.addEvent(&ev_count);
int count_temp_measure;
for (count_temp_measure = 0; sal::simulator.waitAny() == &func_temp_measure;
++count_temp_measure) {
log << "experiment reached Temperature::measure()" << endl;
sal::simulator.addEvent(&func_temp_measure);
// count instructions
// FIXME add SAL functionality for this?
int instr_counter = 0;
while (sal::simulator.waitAny() == &ev_count) {
++instr_counter;
sal::simulator.addEvent(&ev_count);
}
log << "experiment finished after " << std::dec << WEATHER_NUMINSTR << " instructions" << endl;
log << "Temperature::measure() was called " << count_temp_measure << " times" << endl;
log << std::dec << "tracing finished after " << instr_counter
<< " instructions, seeing wait_end " << WEATHER_NUMITER_TRACING << " times" << endl;
sal::simulator.removeFlow(&tp);
// serialize trace to file
@ -102,6 +104,22 @@ bool WeathermonitorExperiment::run()
of.close();
log << "trace written to " << tracefile << endl;
// wait another WEATHER_NUMITER_AFTER measurement loop iterations
bp.setWatchInstructionPointer(WEATHER_FUNC_WAIT_END);
bp.setCounter(WEATHER_NUMITER_AFTER);
sal::simulator.addEvent(&bp);
// count instructions
// FIXME add SAL functionality for this?
instr_counter = 0;
while (sal::simulator.waitAny() == &ev_count) {
++instr_counter;
sal::simulator.addEvent(&ev_count);
}
log << std::dec << "experiment finished after " << instr_counter
<< " instructions, seeing wait_end " << WEATHER_NUMITER_AFTER << " times" << endl;
#elif 0
// STEP 3: The actual experiment.
#if !LOCAL

View File

@ -10,12 +10,22 @@
// main() address:
// nm -C vanilla.elf|fgrep main
#define WEATHER_FUNC_MAIN 0x00100f80
// Temperature::measure() address:
// nm -C vanilla.elf|fgrep 'Temperature::measure()'
#define WEATHER_FUNC_TEMP_MEASURE 0x00100dc0
// number of instructions we want to observe
// 20k suffices for 4 measure() calls; we can do more later (without really learning more?)
#define WEATHER_NUMINSTR 20000
// wait_begin address
#define WEATHER_FUNC_WAIT_BEGIN 0x00100f60
// wait_end address
#define WEATHER_FUNC_WAIT_END 0x00100f70
// number of main loop iterations to trace
// (determines trace length and therefore fault-space width)
#define WEATHER_NUMITER_TRACING 4
// number of instructions needed for these iterations in golden run (taken from
// experiment step #2)
#define WEATHER_NUMINSTR_TRACING 21437
// number of additional loop iterations for FI experiments (to see whether
// everything continues working fine)
#define WEATHER_NUMITER_AFTER 2
// number of instructions needed for these iterations in golden run (taken from
// experiment step #2)
#define WEATHER_NUMINSTR_AFTER 10676
// data/BSS begin:
// nm -C vanilla.elf|fgrep ___DATA_START__
#define WEATHER_DATA_START 0x001018c0

View File

@ -18,12 +18,22 @@ cat >experimentInfo.hpp <<EOF
// main() address:
// nm -C vanilla.elf|fgrep main
#define WEATHER_FUNC_MAIN 0x`addrof $1 main`
// Temperature::measure() address:
// nm -C vanilla.elf|fgrep 'Temperature::measure()'
#define WEATHER_FUNC_TEMP_MEASURE 0x`addrof $1 'Temperature::measure()'`
// number of instructions we want to observe
// 20k suffices for 4 measure() calls; we can do more later (without really learning more?)
#define WEATHER_NUMINSTR 20000
// wait_begin address
#define WEATHER_FUNC_WAIT_BEGIN 0x`addrof $1 wait_begin`
// wait_end address
#define WEATHER_FUNC_WAIT_END 0x`addrof $1 wait_end`
// number of main loop iterations to trace
// (determines trace length and therefore fault-space width)
#define WEATHER_NUMITER_TRACING 4
// number of instructions needed for these iterations in golden run (taken from
// experiment step #2)
#define WEATHER_NUMINSTR_TRACING 21437
// number of additional loop iterations for FI experiments (to see whether
// everything continues working fine)
#define WEATHER_NUMITER_AFTER 2
// number of instructions needed for these iterations in golden run (taken from
// experiment step #2)
#define WEATHER_NUMINSTR_AFTER 10676
// data/BSS begin:
// nm -C vanilla.elf|fgrep ___DATA_START__
#define WEATHER_DATA_START 0x`addrof $1 ___DATA_START__`