summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadhika Jagtap <radhika.jagtap@ARM.com>2014-07-01 11:58:22 -0400
committerRadhika Jagtap <radhika.jagtap@ARM.com>2014-07-01 11:58:22 -0400
commitb998a0c6acdda83aefa8b6e0a182c75d73332a13 (patch)
tree93ab98d4d7ddef84a26ed3d5825d1236fb4f4327
parent65cea4708e2f2f2cb361e12b6385d4bc29618223 (diff)
downloadgem5-b998a0c6acdda83aefa8b6e0a182c75d73332a13.tar.xz
util: Add DVFS perfLevel to checkpoint upgrade script
This patch updates the checkpoint upgrader script. It adds the _perfLevel variable in the clock domain and voltage domain simObjects used for DVFS.
-rw-r--r--src/sim/serialize.hh2
-rwxr-xr-xutil/cpt_upgrader.py17
2 files changed, 18 insertions, 1 deletions
diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh
index 5fc9d7b55..05cb7c50f 100644
--- a/src/sim/serialize.hh
+++ b/src/sim/serialize.hh
@@ -58,7 +58,7 @@ class EventQueue;
* SimObject shouldn't cause the version number to increase, only changes to
* existing objects such as serializing/unserializing more state, changing sizes
* of serialized arrays, etc. */
-static const uint64_t gem5CheckpointVersion = 0x000000000000000a;
+static const uint64_t gem5CheckpointVersion = 0x000000000000000b;
template <class T>
void paramOut(std::ostream &os, const std::string &name, const T &param);
diff --git a/util/cpt_upgrader.py b/util/cpt_upgrader.py
index e14274806..914de02b4 100755
--- a/util/cpt_upgrader.py
+++ b/util/cpt_upgrader.py
@@ -553,6 +553,22 @@ def from_9(cpt):
# upgraded checkpoints were not taken with block-size 64!
cpt.set(sec, 'block_size_bytes', '64')
+# Checkpoint version 11 (0xB) adds the perfLevel variable in the clock domain
+# and voltage domain simObjects used for DVFS and is serialized and
+# unserialized.
+def from_A(cpt):
+ for sec in cpt.sections():
+ import re
+
+ if re.match('^.*sys.*[._]clk_domain$', sec):
+ # Make _perfLevel equal to 0 which means best performance
+ cpt.set(sec, '_perfLevel', ' '.join('0'))
+ elif re.match('^.*sys.*[._]voltage_domain$', sec):
+ # Make _perfLevel equal to 0 which means best performance
+ cpt.set(sec, '_perfLevel', ' '.join('0'))
+ else:
+ continue
+
migrations = []
migrations.append(from_0)
migrations.append(from_1)
@@ -564,6 +580,7 @@ migrations.append(from_6)
migrations.append(from_7)
migrations.append(from_8)
migrations.append(from_9)
+migrations.append(from_A)
verbose_print = False