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:
@ -74,21 +74,23 @@ bool WeathermonitorExperiment::run()
|
|||||||
// this must be done *after* configuring the plugin:
|
// this must be done *after* configuring the plugin:
|
||||||
sal::simulator.addFlow(&tp);
|
sal::simulator.addFlow(&tp);
|
||||||
|
|
||||||
bp.setWatchInstructionPointer(fi::ANY_ADDR);
|
// trace WEATHER_NUMITER_TRACING measurement loop iterations
|
||||||
bp.setCounter(WEATHER_NUMINSTR);
|
bp.setWatchInstructionPointer(WEATHER_FUNC_WAIT_END);
|
||||||
|
bp.setCounter(WEATHER_NUMITER_TRACING);
|
||||||
sal::simulator.addEvent(&bp);
|
sal::simulator.addEvent(&bp);
|
||||||
fi::BPEvent func_temp_measure(WEATHER_FUNC_TEMP_MEASURE);
|
fi::BPEvent ev_count(fi::ANY_ADDR);
|
||||||
sal::simulator.addEvent(&func_temp_measure);
|
sal::simulator.addEvent(&ev_count);
|
||||||
|
|
||||||
int count_temp_measure;
|
// count instructions
|
||||||
for (count_temp_measure = 0; sal::simulator.waitAny() == &func_temp_measure;
|
// FIXME add SAL functionality for this?
|
||||||
++count_temp_measure) {
|
int instr_counter = 0;
|
||||||
log << "experiment reached Temperature::measure()" << endl;
|
while (sal::simulator.waitAny() == &ev_count) {
|
||||||
sal::simulator.addEvent(&func_temp_measure);
|
++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);
|
sal::simulator.removeFlow(&tp);
|
||||||
|
|
||||||
// serialize trace to file
|
// serialize trace to file
|
||||||
@ -102,6 +104,22 @@ bool WeathermonitorExperiment::run()
|
|||||||
of.close();
|
of.close();
|
||||||
log << "trace written to " << tracefile << endl;
|
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
|
#elif 0
|
||||||
// STEP 3: The actual experiment.
|
// STEP 3: The actual experiment.
|
||||||
#if !LOCAL
|
#if !LOCAL
|
||||||
|
|||||||
@ -10,12 +10,22 @@
|
|||||||
// main() address:
|
// main() address:
|
||||||
// nm -C vanilla.elf|fgrep main
|
// nm -C vanilla.elf|fgrep main
|
||||||
#define WEATHER_FUNC_MAIN 0x00100f80
|
#define WEATHER_FUNC_MAIN 0x00100f80
|
||||||
// Temperature::measure() address:
|
// wait_begin address
|
||||||
// nm -C vanilla.elf|fgrep 'Temperature::measure()'
|
#define WEATHER_FUNC_WAIT_BEGIN 0x00100f60
|
||||||
#define WEATHER_FUNC_TEMP_MEASURE 0x00100dc0
|
// wait_end address
|
||||||
// number of instructions we want to observe
|
#define WEATHER_FUNC_WAIT_END 0x00100f70
|
||||||
// 20k suffices for 4 measure() calls; we can do more later (without really learning more?)
|
// number of main loop iterations to trace
|
||||||
#define WEATHER_NUMINSTR 20000
|
// (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:
|
// data/BSS begin:
|
||||||
// nm -C vanilla.elf|fgrep ___DATA_START__
|
// nm -C vanilla.elf|fgrep ___DATA_START__
|
||||||
#define WEATHER_DATA_START 0x001018c0
|
#define WEATHER_DATA_START 0x001018c0
|
||||||
|
|||||||
@ -18,12 +18,22 @@ cat >experimentInfo.hpp <<EOF
|
|||||||
// main() address:
|
// main() address:
|
||||||
// nm -C vanilla.elf|fgrep main
|
// nm -C vanilla.elf|fgrep main
|
||||||
#define WEATHER_FUNC_MAIN 0x`addrof $1 main`
|
#define WEATHER_FUNC_MAIN 0x`addrof $1 main`
|
||||||
// Temperature::measure() address:
|
// wait_begin address
|
||||||
// nm -C vanilla.elf|fgrep 'Temperature::measure()'
|
#define WEATHER_FUNC_WAIT_BEGIN 0x`addrof $1 wait_begin`
|
||||||
#define WEATHER_FUNC_TEMP_MEASURE 0x`addrof $1 'Temperature::measure()'`
|
// wait_end address
|
||||||
// number of instructions we want to observe
|
#define WEATHER_FUNC_WAIT_END 0x`addrof $1 wait_end`
|
||||||
// 20k suffices for 4 measure() calls; we can do more later (without really learning more?)
|
// number of main loop iterations to trace
|
||||||
#define WEATHER_NUMINSTR 20000
|
// (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:
|
// data/BSS begin:
|
||||||
// nm -C vanilla.elf|fgrep ___DATA_START__
|
// nm -C vanilla.elf|fgrep ___DATA_START__
|
||||||
#define WEATHER_DATA_START 0x`addrof $1 ___DATA_START__`
|
#define WEATHER_DATA_START 0x`addrof $1 ___DATA_START__`
|
||||||
|
|||||||
Reference in New Issue
Block a user