summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDam Sunwoo <dam.sunwoo@arm.com>2012-11-02 11:32:01 -0500
committerDam Sunwoo <dam.sunwoo@arm.com>2012-11-02 11:32:01 -0500
commit81406018b0688e956452cd3e00c1ab9aeb9af764 (patch)
treea25309e3a443f1c41a33585c3e7d1a55c2213c49 /util
parent322daba74c122c4ba8c89b73ca8107be02990e5c (diff)
downloadgem5-81406018b0688e956452cd3e00c1ab9aeb9af764.tar.xz
ARM: dump stats and process info on context switches
This patch enables dumping statistics and Linux process information on context switch boundaries (__switch_to() calls) that are used for Streamline integration (a graphical statistics viewer from ARM).
Diffstat (limited to 'util')
-rwxr-xr-xutil/cpt_upgrader.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/util/cpt_upgrader.py b/util/cpt_upgrader.py
index 09e6ef194..ead3d9cbb 100755
--- a/util/cpt_upgrader.py
+++ b/util/cpt_upgrader.py
@@ -105,9 +105,22 @@ def from_1(cpt):
# the system, thus starting at 0
raise ValueError("more than one memory detected (" + sec + ")")
+def from_2(cpt):
+ for sec in cpt.sections():
+ import re
+ # Search for a CPUs
+ if re.search('.*sys.*cpu', sec):
+ try:
+ junk = cpt.get(sec, 'instCnt')
+ cpt.set(sec, '_pid', '0')
+ except ConfigParser.NoOptionError:
+ pass
+
+
migrations = []
migrations.append(from_0)
migrations.append(from_1)
+migrations.append(from_2)
verbose_print = False