changeset 38dd0780322a in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=38dd0780322a
description:
Checkpoint: Fix broken checkpointing functionality
This patch fixes the checkpointing by ensuring that the directory is
passer to the scriptCheckpoints function, and that the num_checkpoints
is not used before it is initialised.
diffstat:
configs/common/Simulation.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 4c67c26fa76e -r 38dd0780322a configs/common/Simulation.py
--- a/configs/common/Simulation.py Sun Aug 19 13:05:53 2012 -0500
+++ b/configs/common/Simulation.py Tue Aug 21 05:48:52 2012 -0400
@@ -153,7 +153,7 @@
return maxtick, checkpoint_dir
-def scriptCheckpoints(options):
+def scriptCheckpoints(options, cptdir):
if options.at_instruction or options.simpoint:
checkpoint_inst = int(options.take_checkpoints)
@@ -180,6 +180,7 @@
when, period = options.take_checkpoints.split(",", 1)
when = int(when)
period = int(period)
+ num_checkpoints = 0
exit_event = m5.simulate(when)
exit_cause = exit_event.getCause()
@@ -192,7 +193,6 @@
num_checkpoints += 1
sim_ticks = when
- num_checkpoints = 0
max_checkpoints = options.max_checkpoints
while num_checkpoints < max_checkpoints and \
@@ -488,7 +488,7 @@
# subsequent periods of <period>. Checkpoint instructions
# received from the benchmark running are ignored and skipped in
# favor of command line checkpoint instructions.
- exit_cause = scriptCheckpoints(options)
+ exit_cause = scriptCheckpoints(options, cptdir)
else:
if options.fast_forward:
m5.stats.reset()
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev