87b9da2df4
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.
17 lines
532 B
Python
17 lines
532 B
Python
# Add TLB to x86 checkpoints
|
|
def upgrader(cpt):
|
|
if cpt.get('root','isa') == 'x86':
|
|
for sec in cpt.sections():
|
|
import re
|
|
# Search for all ISA sections
|
|
if re.search('.*sys.*\.cpu.*\.dtb$', sec):
|
|
cpt.set(sec, '_size', '0')
|
|
cpt.set(sec, 'lruSeq', '0')
|
|
|
|
if re.search('.*sys.*\.cpu.*\.itb$', sec):
|
|
cpt.set(sec, '_size', '0')
|
|
cpt.set(sec, 'lruSeq', '0')
|
|
else:
|
|
print "ISA is not x86"
|
|
|
|
legacy_version = 6
|