diff options
author | jeff <jeff@FreeBSD.org> | 2004-12-26 03:25:08 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2004-12-26 03:25:08 +0000 |
commit | 7b0ff93d2ddb6788feb7e3edf65fb33803e4f33c (patch) | |
tree | 0afd33ea3e9405e3b46905daf67590044d2f4d09 /tools/sched/schedgraph.py | |
parent | 8d13141666fa236fbdea1afd13b1711cf205a78b (diff) | |
download | FreeBSD-src-7b0ff93d2ddb6788feb7e3edf65fb33803e4f33c.zip FreeBSD-src-7b0ff93d2ddb6788feb7e3edf65fb33803e4f33c.tar.gz |
- For preemption and yield events, we want to skip the next two state events
as they are the setrunqueue() and sched_add() calls. Since they happen
immediately before the thread is placed on a run queue they would normally
dwarf the more informative preemption or yield event and it is implicitly
understood that a thread is back on the run queue as part of these events.
Diffstat (limited to 'tools/sched/schedgraph.py')
-rw-r--r-- | tools/sched/schedgraph.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/sched/schedgraph.py b/tools/sched/schedgraph.py index a598176..e56ee8a 100644 --- a/tools/sched/schedgraph.py +++ b/tools/sched/schedgraph.py @@ -394,13 +394,14 @@ class StateEvent(Event): next = self.nextstate() if (self.skipself == 1 or next == None): return (xpos) - if (self.skipnext): + while (self.skipnext): skipped = next next.skipself = 1 next.real = 0 next = next.nextstate() if (next == None): next = skipped + self.skipnext -= 1 self.duration = next.timestamp - self.timestamp delta = self.duration / canvas.ratio l = canvas.create_rectangle(xpos, ypos, @@ -487,7 +488,7 @@ class Yielding(StateEvent): enabled = 1 def __init__(self, thread, cpu, timestamp, prio): StateEvent.__init__(self, thread, cpu, timestamp) - self.skipnext = 1 + self.skipnext = 2 self.prio = prio self.textadd(("prio:", self.prio, 0)) @@ -532,7 +533,7 @@ class Preempted(StateEvent): enabled = 1 def __init__(self, thread, cpu, timestamp, prio, bythread): StateEvent.__init__(self, thread, cpu, timestamp) - self.skipnext = 1 + self.skipnext = 2 self.prio = prio self.linked = bythread self.textadd(("prio:", self.prio, 0)) |