Hoa Nguyen has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/9 )
Change subject: util: Fix checkpoint-tester.py checkpoint parameter
..
util: Fix checkpoint-tester.py checkpoint parameter
checkpoint-tester script tests gem5's checkpoints by
using gem5 to produce a series of checkpoints, each with
a specified interval. After that, for all K > 1,
each of K-th produced checkpoint is used by gem5 to produce
the {K+1}-th checkpoint. The newly produced checkpoint will
be compared against the {K+1}-th checkpoint that was
previously produced.
Previously, in the tester script, the inputs to
`--take-checkpoints X,Y` was `(interval, interval)`.
The intention was to restore the N-th checkpoint and to run
the simulation for `interval` ticks.
According to the current configs/common/Options.py file,
`--take-checkpoints X,Y` means `X` is the starting tick of
the simulation, while `Y` is the number of ticks to be simulated
after tick `X`.
Therefore, `X` should be the starting tick of the N-th checkpont,
and this change addresses this problem.
Change-Id: I1fd7c91c9454f42a4fb98aa878fb5e4ac7d238f3
Signed-off-by: Hoa Nguyen
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/9
Reviewed-by: Jason Lowe-Power
Reviewed-by: Daniel Carvalho
Maintainer: Jason Lowe-Power
Tested-by: kokoro
---
M util/checkpoint-tester.py
1 file changed, 8 insertions(+), 7 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Daniel Carvalho: Looks good to me, approved
kokoro: Regressions pass
diff --git a/util/checkpoint-tester.py b/util/checkpoint-tester.py
index 2600644..5817469 100755
--- a/util/checkpoint-tester.py
+++ b/util/checkpoint-tester.py
@@ -55,12 +55,12 @@
#
# Examples:
#
-# util/checkpoint-tester.py -i 40 -- build//m5.opt \
-# configs/example/se.py -c
tests/test-progs/hello/bin//tru64/hello \
+# util/checkpoint-tester.py -i 40 -- build//gem5.opt \
+# configs/example/se.py -c
tests/test-progs/hello/bin//linux/hello \
# --output=progout --errout=progerr
#
-# util/checkpoint-tester.py -i 2000 -- build//m5.opt \
-# configs/example/fs.py --script tests/halt.sh
+# util/checkpoint-tester.py -i 2000 -- build//gem5.opt \
+# configs/example/fs.py --script configs/boot/halt.sh
#
@@ -94,12 +94,12 @@
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 @@
# 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]
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/9
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I1fd7c91c9454f42a4fb98aa878fb5e4ac7d238f3
Gerrit-Change-Number: 9
Gerrit-PatchSet: 4
Gerrit-Owner: Hoa Nguyen
Gerrit-Reviewer: Daniel Carvalho
Gerrit-Reviewer: Gabe Black
Gerrit-Reviewer: Hoa Nguyen
Gerrit-Reviewer: Jason Lowe-Power
Gerrit-Reviewer: kokoro
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s