summaryrefslogtreecommitdiff
path: root/util/cpt_upgrader.py
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2012-06-05 10:36:59 -0400
committerAli Saidi <Ali.Saidi@ARM.com>2012-06-05 10:36:59 -0400
commitc06970b673181aa1032210b60ad799eb97105ae5 (patch)
tree4687081862c6031049e0b18915a525e4db060d78 /util/cpt_upgrader.py
parentc49e739352b6d6bd665c78c560602d0cff1e6a1a (diff)
downloadgem5-c06970b673181aa1032210b60ad799eb97105ae5.tar.xz
cpt: update some comments in the checkpoint migration script
Diffstat (limited to 'util/cpt_upgrader.py')
-rwxr-xr-xutil/cpt_upgrader.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/util/cpt_upgrader.py b/util/cpt_upgrader.py
index 73965d0ab..76d61acf9 100755
--- a/util/cpt_upgrader.py
+++ b/util/cpt_upgrader.py
@@ -38,6 +38,25 @@
# Authors: Ali Saidi
#
+# This python code is used to migrate checkpoints that were created in one
+# version of the simulator to newer version. As features are added or bugs are
+# fixed some of the state that needs to be checkpointed can change. If you have
+# many historic checkpoints that you use, manually editing them to fix them is
+# both time consuming and error-prone.
+
+# This script provides a way to migrate checkpoints to the newer repository in
+# a programatic way. It can be imported into another script or used on the
+# command line. From the command line the script will either migrate every
+# checkpoint it finds recursively (-r option) or a single checkpoint. When a
+# change is made to the gem5 repository that breaks previous checkpoints a
+# from_N() method should be implemented here and the gem5CheckpointVersion
+# variable in src/sim/serialize.hh should be incremented. For each version
+# between the checkpoints current version and the new version the from_N()
+# method will be run, passing in a ConfigParser object which contains the open
+# file. As these operations can be isa specific the method can verify the isa
+# and use regexes to find the correct sections that need to be updated.
+
+
import ConfigParser
import sys, os
import os.path as osp