From 81406018b0688e956452cd3e00c1ab9aeb9af764 Mon Sep 17 00:00:00 2001 From: Dam Sunwoo Date: Fri, 2 Nov 2012 11:32:01 -0500 Subject: 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). --- util/cpt_upgrader.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'util') 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 -- cgit v1.2.3