Hi,
I'm trying to stop the gem5 simulation periodically based on number of
instructions executed and create checkpoints.
I've put together this functionality based on examples in the
Simulate.py script and my changes look like this:
.
.
exit_event = m5.simulate()
exit_cause = exit_event.getCause()
print "first exit cause = %s" % exit_cause
while exit_cause == "a thread reached the max instruction count" :
print "Creating checkpoint at inst:%d" % (checkpoint_inst)
m5.checkpoint(joinpath(cptdir, "cpt.%s.%d" %
(options.bench, checkpoint_inst)))
print "Checkpoint written."
# Set all cpus with number of instructions to simulate
before checkpointing
checkpoint_inst += period
for i in xrange(options.num_cpus):
testsys.cpu[i].max_insts = checkpoint_inst
print "set checkpoint_inst to %d for CPU %d" %
(testsys.cpu[i].max_insts_any_thread, i)
# simulate
print "Starting simulation again ...."
exit_event = m5.simulate()
exit_cause = exit_event.getCause()
.
.
These changes however fail to generate the checkpoints periodically.
Only one checkpoint is generated with this code.
I've cloned the repository recently (about a monthago) and I'm
simulating an ARM VExpress_EMM machine in FS mode. My command line to
launchgem5 is below. It is supposed to generate the first checkpoint
checkpoint after 1000 instructions from start, and then periodically
after every 1000 instructions:
./build/ARM/gem5.fast -d m5out_inst configs/example/fs.py
--kernel=/gem5/FSimages/vmlinux-3.3-arm-vexpress-emm-pcie
--machine-type=VExpress_EMM --num-cpus=1 --mem-size=2047MB
--disk-image=/gem5/FSimages/disks/arm-ubuntu-natty-headless.img
--checkpoint-dir=./inst_chkpts --at-instruction
--take-checkpoints=1000,1000 -b test_benchmark
This issueis very similar to one discussed in this gem5-users thread
previously >>
http://comments.gmane.org/gmane.comp.emulators.m5.users/8662
I've also experimented with m5.stats.dump() followed by m5.stats.reset()
as suggested in the thread, however it doesn't seem to be working. I've
also tried changing the CPU model from AtomicSimple to Timing and
Detailed to no avail.
Any suggestions?
Thanks,
-Kshitij
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users