From 87b9da2df4d4dc0028566a7803ee55159343d735 Mon Sep 17 00:00:00 2001 From: Curtis Dunham Date: Wed, 2 Sep 2015 15:23:30 -0500 Subject: sim: tag-based checkpoint versioning This commit addresses gem5 checkpoints' linear versioning bottleneck. Since development is distributed across many private trees, there exists a sort of 'race' for checkpoint version numbers: internally a checkpoint version may be used but then resynchronizing with the external tree causes a conflict on that version. This change replaces the linear version number with a set of unique strings called tags. Now the only conflicts that can arise are of tag names, where collisions are much easier to avoid. The checkpoint upgrader (util/cpt_upgrader.py) upgrades the version representation, as one would expect. Each tag version implements its upgrader code in a python file in the util/cpt_upgraders directory rather than adding a function to the upgrader script itself. The version tags are stored in the 'Globals' section rather than 'root' (as the version was previously) because 'Globals' gets unserialized first and can provide a warning before any other unserialization errors can occur. --- src/SConscript | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/SConscript') diff --git a/src/SConscript b/src/SConscript index 95c8f002f..eae03a98a 100755 --- a/src/SConscript +++ b/src/SConscript @@ -916,6 +916,11 @@ env.Command('debug/flags.cc', Value(debug_flags), env.Depends(SWIG, 'debug/flags.cc') Source('debug/flags.cc') +# version tags +env.Command('sim/tags.cc', None, + MakeAction('util/cpt_upgrader.py --get-cc-file > $TARGET', + Transform("VER TAGS"))) + # Embed python files. All .py files that have been indicated by a # PySource() call in a SConscript need to be embedded into the M5 # library. To do that, we compile the file to byte code, marshal the -- cgit v1.2.3