summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2007-11-12 17:33:07 +0000
committerjeff <jeff@FreeBSD.org>2007-11-12 17:33:07 +0000
commit0923616b22e7c00a0e8931b36372dfe96770474b (patch)
treedc101d04ff543613293a1f357679c10de35798ae /tools
parent1bb52a67d40d2dcb34f8bfe4635c4beab7b7dbce (diff)
downloadFreeBSD-src-0923616b22e7c00a0e8931b36372dfe96770474b.zip
FreeBSD-src-0923616b22e7c00a0e8931b36372dfe96770474b.tar.gz
- Fix the ktr header regexp so we match lines with very large indexes.
- Add support for messages where cpu load is added to a remote cpu. - print unmatched lines to stdout
Diffstat (limited to 'tools')
-rw-r--r--tools/sched/schedgraph.py23
1 files changed, 19 insertions, 4 deletions
diff --git a/tools/sched/schedgraph.py b/tools/sched/schedgraph.py
index eb5f7308..f841c3a 100644
--- a/tools/sched/schedgraph.py
+++ b/tools/sched/schedgraph.py
@@ -515,7 +515,7 @@ class Yielding(StateEvent):
enabled = 1
def __init__(self, thread, cpu, timestamp, prio):
StateEvent.__init__(self, thread, cpu, timestamp)
- self.skipnext = 1
+ self.skipnext = 0
self.prio = prio
self.textadd(("prio:", self.prio, 0))
@@ -862,7 +862,7 @@ class KTRFile:
print "Can't open", file
sys.exit(1)
- ktrhdr = "\s+\d+\s+(\d+)\s+(\d+)\s+"
+ ktrhdr = "\s*\d+\s+(\d+)\s+(\d+)\s+"
tdname = "(\S+)\(([^)]*)\)"
crittdname = "(\S+)\s+\(\d+,\s+([^)]*)\)"
@@ -901,12 +901,14 @@ class KTRFile:
sched_prio_re = re.compile(ktrhdr + ktrstr)
cpuload_re = re.compile(ktrhdr + "load: (\d+)")
+ cpuload2_re = re.compile(ktrhdr + "cpu (\d+) load: (\d+)")
loadglobal_re = re.compile(ktrhdr + "global load: (\d+)")
ktrstr = "critical_\S+ by thread " + crittdname + " to (\d+)"
critsec_re = re.compile(ktrhdr + ktrstr)
parsers = [[cpuload_re, self.cpuload],
+ [cpuload2_re, self.cpuload2],
[loadglobal_re, self.loadglobal],
[switchin_re, self.switchin],
[switchout_re, self.switchout],
@@ -932,8 +934,8 @@ class KTRFile:
if (m != None):
p[1](*m.groups())
break
- # if (m == None):
- # print line,
+ if (m == None):
+ print line,
def synchstamp(self, lines):
status.startup("Rationalizing Timestamps")
@@ -1122,6 +1124,19 @@ class KTRFile:
self.sources.insert(0, load)
Count(load, cpu, timestamp, count)
+ def cpuload2(self, cpu, timestamp, ncpu, count):
+ timestamp = self.checkstamp(cpu, timestamp)
+ if (timestamp == 0):
+ return
+ cpu = int(ncpu)
+ try:
+ load = self.load[cpu]
+ except:
+ load = Counter("cpu" + str(cpu) + " load")
+ self.load[cpu] = load
+ self.sources.insert(0, load)
+ Count(load, cpu, timestamp, count)
+
def loadglobal(self, cpu, timestamp, count):
timestamp = self.checkstamp(cpu, timestamp)
if (timestamp == 0):
OpenPOWER on IntegriCloud