summaryrefslogtreecommitdiff
path: root/util/cpt_upgrader.py
diff options
context:
space:
mode:
authorMarco Elver <marco.elver@ed.ac.uk>2014-04-19 09:00:30 -0500
committerMarco Elver <marco.elver@ed.ac.uk>2014-04-19 09:00:30 -0500
commitd9fa950396e8f331bbfb1023348c8c680967b1be (patch)
treede8a7a5902da5952c70f88d43fd8fc89c496377a /util/cpt_upgrader.py
parent097aadc2cddafdd6433aa8f57b141f0e01222e45 (diff)
downloadgem5-d9fa950396e8f331bbfb1023348c8c680967b1be.tar.xz
ruby: recorder: Fix (de-)serializing with different cache block-sizes
Upon aggregating records, serialize system's cache-block size, as the cache-block size can be different when restoring from a checkpoint. This way, we can correctly read all records when restoring from a checkpoints, even if the cache-block size is different. Note, that it is only possible to restore from a checkpoint if the desired cache-block size is smaller or equal to the cache-block size when the checkpoint was taken; we can split one larger request into multiple small ones, but it is not reliable to do the opposite. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'util/cpt_upgrader.py')
-rwxr-xr-xutil/cpt_upgrader.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/cpt_upgrader.py b/util/cpt_upgrader.py
index fac9e07a7..e14274806 100755
--- a/util/cpt_upgrader.py
+++ b/util/cpt_upgrader.py
@@ -545,6 +545,13 @@ def from_8(cpt):
cpt.set(new_sec, 'bootUncacheability', 'false')
cpt.set(new_sec, 'num_entries', '0')
+# Version 10 adds block_size_bytes to system.ruby
+def from_9(cpt):
+ for sec in cpt.sections():
+ if sec == 'system.ruby':
+ # Use Gem5's default of 64; this should be changed if the to be
+ # upgraded checkpoints were not taken with block-size 64!
+ cpt.set(sec, 'block_size_bytes', '64')
migrations = []
migrations.append(from_0)
@@ -556,6 +563,7 @@ migrations.append(from_5)
migrations.append(from_6)
migrations.append(from_7)
migrations.append(from_8)
+migrations.append(from_9)
verbose_print = False