Hello Curtis Dunham,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/2560
to review the following change.
Change subject: config, arm: Unify checkpoint path handling in bL configs
......................................................................
config, arm: Unify checkpoint path handling in bL configs
The vanilla bL configuration file and the dist-gem5 configuration file
use slightly different code paths when restoring from
checkpoints. Unify this by passing the parsed options to the
instantiate() method and adding an optional checkpoint keyword
argument for checkpoint directories (only used by the dist-gem5
script).
Change-Id: I9943ec10bd7a256465e29c8de571142ec3fbaa0e
Signed-off-by: Andreas Sandberg <[email protected]>
Reviewed-by: Curtis Dunham <[email protected]>
Reviewed-by: Sascha Bischoff <[email protected]>
Reviewed-by: Gabor Dozsa <[email protected]>
---
M configs/example/arm/dist_bigLITTLE.py
M configs/example/arm/fs_bigLITTLE.py
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/configs/example/arm/dist_bigLITTLE.py
b/configs/example/arm/dist_bigLITTLE.py
index 13b8abf..5194fc7 100644
--- a/configs/example/arm/dist_bigLITTLE.py
+++ b/configs/example/arm/dist_bigLITTLE.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 ARM Limited
+# Copyright (c) 2016-2017 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -132,12 +132,7 @@
root = bL.build(options)
addEthernet(root.system, options)
- if options.restore_from:
- checkpoint_path = os.path.join(options.checkpoint_dir,
- options.restore_from)
- else:
- checkpoint_path = None
- bL.instantiate(checkpoint_path)
+ bL.instantiate(options, checkpoint_dir=options.checkpoint_dir)
bL.run(options.checkpoint_dir)
diff --git a/configs/example/arm/fs_bigLITTLE.py
b/configs/example/arm/fs_bigLITTLE.py
index c542b85..c2ecf88 100644
--- a/configs/example/arm/fs_bigLITTLE.py
+++ b/configs/example/arm/fs_bigLITTLE.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 ARM Limited
+# Copyright (c) 2016-2017 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -209,11 +209,16 @@
return root
-def instantiate(checkpoint_path=None):
+def instantiate(options, checkpoint_dir=None):
# Get and load from the chkpt or simpoint checkpoint
- if checkpoint_path is not None:
- m5.util.inform("Restoring from checkpoint %s", checkpoint_path)
- m5.instantiate(checkpoint_path)
+ if options.restore_from:
+ if checkpoint_dir and not os.path.isabs(options.restore_from):
+ cpt = os.path.join(checkpoint_dir, options.restore_from)
+ else:
+ cpt = options.restore_from
+
+ m5.util.inform("Restoring from checkpoint %s", cpt)
+ m5.instantiate(cpt)
else:
m5.instantiate()
@@ -241,7 +246,7 @@
addOptions(parser)
options = parser.parse_args()
root = build(options)
- instantiate(options.restore_from)
+ instantiate(options)
run()
--
To view, visit https://gem5-review.googlesource.com/2560
To unsubscribe, visit https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9943ec10bd7a256465e29c8de571142ec3fbaa0e
Gerrit-Change-Number: 2560
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Curtis Dunham <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev