1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

- 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.
This commit is contained in:
Jeff Roberson 2004-12-26 03:25:08 +00:00
parent b0e485185f
commit 9a5c9d55e7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139321

View File

@ -394,13 +394,14 @@ def draw(self, canvas, xpos, ypos):
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))