changeset 0e38b529c387 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=0e38b529c387
description:
        cpt: update some comments in the checkpoint migration script

diffstat:

 src/sim/serialize.hh |   4 ++--
 util/cpt_upgrader.py |  19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r 38f1926fb599 -r 0e38b529c387 src/sim/serialize.hh
--- a/src/sim/serialize.hh      Tue Jun 05 01:23:16 2012 -0400
+++ b/src/sim/serialize.hh      Tue Jun 05 10:36:59 2012 -0400
@@ -52,10 +52,10 @@
 
 /** The current version of the checkpoint format.
  * This should be incremented by 1 and only 1 for every new version, where a 
new
- * version is defined as a checkpoint created before this version wont work on
+ * version is defined as a checkpoint created before this version won't work on
  * the current version until the checkpoint format is updated. Adding a new
  * SimObject shouldn't cause the version number to increase, only changes to
- * existing objects such as serializing/unserializing more stote, changing 
sizes
+ * existing objects such as serializing/unserializing more state, changing 
sizes
  * of serialized arrays, etc. */
 static const uint64_t gem5CheckpointVersion = 0x0000000000000001;
 
diff -r 38f1926fb599 -r 0e38b529c387 util/cpt_upgrader.py
--- a/util/cpt_upgrader.py      Tue Jun 05 01:23:16 2012 -0400
+++ b/util/cpt_upgrader.py      Tue Jun 05 10:36:59 2012 -0400
@@ -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
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to