changeset 9f5e9bdc2f27 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=9f5e9bdc2f27
description:
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.
diffstat:
src/sim/serialize.hh | 2 +-
util/cpt_upgrader.py | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletions(-)
diffs (46 lines):
diff -r 6bbb7ae309ac -r 9f5e9bdc2f27 src/sim/serialize.hh
--- a/src/sim/serialize.hh Mon Jun 30 13:56:06 2014 -0400
+++ b/src/sim/serialize.hh Tue Jul 01 11:58:22 2014 -0400
@@ -58,7 +58,7 @@
* 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 ¶m);
diff -r 6bbb7ae309ac -r 9f5e9bdc2f27 util/cpt_upgrader.py
--- a/util/cpt_upgrader.py Mon Jun 30 13:56:06 2014 -0400
+++ b/util/cpt_upgrader.py Tue Jul 01 11:58:22 2014 -0400
@@ -553,6 +553,22 @@
# 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_7)
migrations.append(from_8)
migrations.append(from_9)
+migrations.append(from_A)
verbose_print = False
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev