summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2010-08-17 05:17:06 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2010-08-17 05:17:06 -0700
commit2519d116c9171ed4bf220d5049f244b333aa0842 (patch)
tree9aa0a55cf7274e0657383903043e65b3d8fc8eaa /configs
parentcfaddd5fd348bfa6fb8e575d87ca75a05e04b3b0 (diff)
downloadgem5-2519d116c9171ed4bf220d5049f244b333aa0842.tar.xz
sim: fold checkpoint restore code into instantiate()
The separate restoreCheckpoint() call is gone; just pass the checkpoint dir as an optional arg to instantiate(). This change is a precursor to some more extensive reworking of the startup code.
Diffstat (limited to 'configs')
-rw-r--r--configs/common/Simulation.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py
index 8e1f84cdf..79e3066a8 100644
--- a/configs/common/Simulation.py
+++ b/configs/common/Simulation.py
@@ -190,8 +190,7 @@ def run(options, root, testsys, cpu_class):
for i in xrange(np):
testsys.cpu[i].max_insts_any_thread = offset
- m5.instantiate()
-
+ checkpoint_dir = None
if options.checkpoint_restore != None:
from os.path import isdir, exists
from os import listdir
@@ -212,10 +211,6 @@ def run(options, root, testsys, cpu_class):
"cpt.%s.%s" % (options.bench, inst))
if not exists(checkpoint_dir):
fatal("Unable to find checkpoint directory %s", checkpoint_dir)
-
- print "Restoring checkpoint ..."
- m5.restoreCheckpoint(checkpoint_dir)
- print "Done."
else:
dirs = listdir(cptdir)
expr = re.compile('cpt\.([0-9]*)')
@@ -234,10 +229,9 @@ def run(options, root, testsys, cpu_class):
## Adjust max tick based on our starting tick
maxtick = maxtick - int(cpts[cpt_num - 1])
+ checkpoint_dir = joinpath(cptdir, "cpt.%s" % cpts[cpt_num - 1])
- ## Restore the checkpoint
- m5.restoreCheckpoint(joinpath(cptdir,
- "cpt.%s" % cpts[cpt_num - 1]))
+ m5.instantiate(checkpoint_dir)
if options.standard_switch or cpu_class:
if options.standard_switch: