diff --git a/util/checkpoint-tester.py b/util/checkpoint-tester.py index 2600644da9..58174693c6 100755 --- a/util/checkpoint-tester.py +++ b/util/checkpoint-tester.py @@ -55,12 +55,12 @@ # # Examples: # -# util/checkpoint-tester.py -i 400000 -- build//m5.opt \ -# configs/example/se.py -c tests/test-progs/hello/bin//tru64/hello \ +# util/checkpoint-tester.py -i 400000 -- build//gem5.opt \ +# configs/example/se.py -c tests/test-progs/hello/bin//linux/hello \ # --output=progout --errout=progerr # -# util/checkpoint-tester.py -i 200000000000 -- build//m5.opt \ -# configs/example/fs.py --script tests/halt.sh +# util/checkpoint-tester.py -i 200000000000 -- build//gem5.opt \ +# configs/example/fs.py --script configs/boot/halt.sh # @@ -94,12 +94,12 @@ m5_binary = args.cmdline[0] args = args.cmdline[1:] -initial_args = ['--take-checkpoints', '%d,%d' % (interval, interval)] +checkpoint_args = ['--take-checkpoints', '%d,%d' % (interval, interval)] cptdir = os.path.join(top_dir, 'm5out') print('===> Running initial simulation.') -subprocess.call([m5_binary] + ['-red', cptdir] + args + initial_args) +subprocess.call([m5_binary] + ['-red', cptdir] + args + checkpoint_args) dirs = os.listdir(cptdir) expr = re.compile('cpt\.([0-9]*)') @@ -117,8 +117,9 @@ cpts.sort() # less than tha number of checkpoints. for i in range(1, len(cpts)): print('===> Running test %d of %d.' % (i, len(cpts)-1)) + checkpoint_args = ['--take-checkpoints', '%d,%d' % (cpts[i], interval)] mydir = os.path.join(top_dir, 'test.%d' % i) - subprocess.call([m5_binary] + ['-red', mydir] + args + initial_args + + subprocess.call([m5_binary] + ['-red', mydir] + args + checkpoint_args + ['--max-checkpoints' , '1', '--checkpoint-dir', cptdir, '--checkpoint-restore', str(i)]) cpt_name = 'cpt.%d' % cpts[i]