Hi Nowroz,
general/inst_mode_init refers to configuration values, either in
base.cfg, or passed to run-sniper on the command-line using -g
--general/inst_mode_init. You can read these values from Python
through sim.config.get("general/inst_mode_init"). But updating these
values on the fly won't help, they are only read during initialization
of the simulator.
What you'll want to do is use the sim.control.set_instrumentation_mode
interface, passing one of sim.control.FASTFORWARD / sim.control.WARMUP
/ sim.control.DETAILED as the argument allows you to dynamically
switch between the instrumentation modes. You'll also want to write a
statistics snapshot before each switch using
sim.stats.write("<unique-name>") so you can later compute IPC for each
interval and compute the appropriate average.
It sounds to me as if you'll be doing periodic sampling. Note that we
will soon release some infrastructure for this which we've used for
the experiments in our ISPASS paper [1]. This infrastructure is
modular so you'll be able to specify your own sample selection
algorithm (from C++ code, not a script), in addition to our own
time-based periodic sampling.
Regards,
Wim
[1]
http://snipersim.org/w/Paper:Ispass2013Carlson