Checkpoint: Pass maxtick to avoid undefined variable

This patch fixes a bug in scriptCheckpoints, where maxtick was used
undefined. The bug caused checkpointing by means of --take-checkpoints
to fail.
This commit is contained in:
Andreas Hansson 2012-09-11 14:14:51 -04:00
parent 584eba3ab6
commit 9ad7e23e9e

View file

@ -153,7 +153,7 @@ def findCptDir(options, maxtick, cptdir, testsys):
return maxtick, checkpoint_dir return maxtick, checkpoint_dir
def scriptCheckpoints(options, cptdir): def scriptCheckpoints(options, maxtick, cptdir):
if options.at_instruction or options.simpoint: if options.at_instruction or options.simpoint:
checkpoint_inst = int(options.take_checkpoints) checkpoint_inst = int(options.take_checkpoints)
@ -488,7 +488,7 @@ def run(options, root, testsys, cpu_class):
# subsequent periods of <period>. Checkpoint instructions # subsequent periods of <period>. Checkpoint instructions
# received from the benchmark running are ignored and skipped in # received from the benchmark running are ignored and skipped in
# favor of command line checkpoint instructions. # favor of command line checkpoint instructions.
exit_cause = scriptCheckpoints(options, cptdir) exit_cause = scriptCheckpoints(options, maxtick, cptdir)
else: else:
if options.fast_forward: if options.fast_forward:
m5.stats.reset() m5.stats.reset()