- Print clock information so we know if something is not reported correctly
from the tsc. - Set skipnext = 1 for yielding and preempted events so we don't show the event that adds us back to the run queue. It used to be 2 so we would skip the ksegrp run queue addition and the system run queue addition but the ksegrp run queue has gone away. - Don't display down to nanosecond resolution for scheduling events right now. This can sometimes cause a division by zero.
This commit is contained in:
parent
781cf91bcd
commit
4a2e6a080b
@ -50,11 +50,8 @@ status = None
|
|||||||
configtypes = []
|
configtypes = []
|
||||||
|
|
||||||
def ticks2sec(ticks):
|
def ticks2sec(ticks):
|
||||||
ns = ticksps / 1000000000
|
us = ticksps / 1000000
|
||||||
ticks /= ns
|
ticks /= us
|
||||||
if (ticks < 1000):
|
|
||||||
return (str(ticks) + "ns")
|
|
||||||
ticks /= 1000
|
|
||||||
if (ticks < 1000):
|
if (ticks < 1000):
|
||||||
return (str(ticks) + "us")
|
return (str(ticks) + "us")
|
||||||
ticks /= 1000
|
ticks /= 1000
|
||||||
@ -498,7 +495,7 @@ class Yielding(StateEvent):
|
|||||||
enabled = 1
|
enabled = 1
|
||||||
def __init__(self, thread, cpu, timestamp, prio):
|
def __init__(self, thread, cpu, timestamp, prio):
|
||||||
StateEvent.__init__(self, thread, cpu, timestamp)
|
StateEvent.__init__(self, thread, cpu, timestamp)
|
||||||
self.skipnext = 2
|
self.skipnext = 1
|
||||||
self.prio = prio
|
self.prio = prio
|
||||||
self.textadd(("prio:", self.prio, 0))
|
self.textadd(("prio:", self.prio, 0))
|
||||||
|
|
||||||
@ -543,7 +540,7 @@ class Preempted(StateEvent):
|
|||||||
enabled = 1
|
enabled = 1
|
||||||
def __init__(self, thread, cpu, timestamp, prio, bythread):
|
def __init__(self, thread, cpu, timestamp, prio, bythread):
|
||||||
StateEvent.__init__(self, thread, cpu, timestamp)
|
StateEvent.__init__(self, thread, cpu, timestamp)
|
||||||
self.skipnext = 2
|
self.skipnext = 1
|
||||||
self.prio = prio
|
self.prio = prio
|
||||||
self.linked = bythread
|
self.linked = bythread
|
||||||
self.textadd(("prio:", self.prio, 0))
|
self.textadd(("prio:", self.prio, 0))
|
||||||
@ -829,6 +826,9 @@ class KTRFile:
|
|||||||
self.fixup()
|
self.fixup()
|
||||||
global ticksps
|
global ticksps
|
||||||
ticksps = self.ticksps()
|
ticksps = self.ticksps()
|
||||||
|
print "Ticks per second", ticksps, "timespan", self.timespan()
|
||||||
|
print "stathz", self.stathz
|
||||||
|
print "first", self.timestamp_first, "last", self.timestamp_last
|
||||||
|
|
||||||
def parse(self, file):
|
def parse(self, file):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user