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).
This commit is contained in:
Dam Sunwoo
2012-11-02 11:32:01 -05:00
parent 322daba74c
commit 81406018b0
9 changed files with 222 additions and 5 deletions

View File

@@ -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