summaryrefslogtreecommitdiff
path: root/configs/common
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2010-07-05 21:39:38 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2010-07-05 21:39:38 -0700
commitcbd65e95dba33c0c88411b11c3e864cbc2567bbf (patch)
tree5d0a9a232d4b783fd223e2ac179bf70cc87e9f14 /configs/common
parentf98cce577128891a222f42b5be6da23b04c1ec43 (diff)
downloadgem5-cbd65e95dba33c0c88411b11c3e864cbc2567bbf.tar.xz
util: add a script for testing checkpointing
See comments in util/checkpoint-tester.py for details.
Diffstat (limited to 'configs/common')
-rw-r--r--configs/common/Simulation.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py
index 1c9d4ff4e..905e435d3 100644
--- a/configs/common/Simulation.py
+++ b/configs/common/Simulation.py
@@ -292,6 +292,16 @@ def run(options, root, testsys, cpu_class):
num_checkpoints = 0
exit_cause = ''
+ # If we're taking and restoring checkpoints, use checkpoint_dir
+ # option only for finding the checkpoints to restore from. This
+ # lets us test checkpointing by restoring from one set of
+ # checkpoints, generating a second set, and then comparing them.
+ if options.take_checkpoints and options.checkpoint_restore:
+ if m5.options.outdir:
+ cptdir = m5.options.outdir
+ else:
+ cptdir = getcwd()
+
# Checkpoints being taken via the command line at <when> and at
# subsequent periods of <period>. Checkpoint instructions
# received from the benchmark running are ignored and skipped in