summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2015-02-13 00:29:57 +0000
committersbruno <sbruno@FreeBSD.org>2015-02-13 00:29:57 +0000
commit538802789a529fb5850e4d2625c62f36c1b0e2f1 (patch)
treed0eec84147dc302e2a17fd024c99ad62a4bd538b /tools
parent914dd97ca51bfe6301ae8bd78c4d92aec1e8aa48 (diff)
downloadFreeBSD-src-538802789a529fb5850e4d2625c62f36c1b0e2f1.zip
FreeBSD-src-538802789a529fb5850e4d2625c62f36c1b0e2f1.tar.gz
MFC 272315 272757 274091 274902
r272315 Explicitly return None for negative event indices. Prior to this, eventat(-1) would return the next-to-last event causing the back button to cycle back to the end of an event source instead of stopping at the start. r272757 Add schedgraph traces for callout handlers. Specifically, a callwheel logs a running event each time it executes a callout function. The event includes the function pointer, argument, and whether or not it was run from hardware interrupt context. The callwheel is marked idle when each handler completes. This effectively logs the duration of each callout routine in the graph. r274091 Bind Ctrl-Q as a global hotkey to exit. Bind Ctrl-W as a hotkey to close dialogs. r274902 Add a new thread state "spinning" to schedgraph and add tracepoints at the start and stop of spinning waits in lock primitives. Reviewed by: jhb
Diffstat (limited to 'tools')
-rw-r--r--tools/sched/schedgraph.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/sched/schedgraph.py b/tools/sched/schedgraph.py
index 4335574..48adc08 100644
--- a/tools/sched/schedgraph.py
+++ b/tools/sched/schedgraph.py
@@ -70,6 +70,7 @@ eventcolors = [
("count", "red"),
("running", "green"),
("idle", "grey"),
+ ("spinning", "red"),
("yielding", "yellow"),
("swapped", "violet"),
("suspended", "purple"),
@@ -80,8 +81,6 @@ eventcolors = [
("runq rem", "yellow"),
("thread exit", "grey"),
("proc exit", "grey"),
- ("callwheel idle", "grey"),
- ("callout running", "green"),
("lock acquire", "blue"),
("lock contest", "purple"),
("failed lock try", "red"),
@@ -856,7 +855,7 @@ class EventSource:
return (Y_EVENTSOURCE)
def eventat(self, i):
- if (i >= len(self.events)):
+ if (i >= len(self.events) or i < 0):
return (None)
event = self.events[i]
return (event)
@@ -903,7 +902,6 @@ class KTRFile:
self.timestamp_f = None
self.timestamp_l = None
self.locks = {}
- self.callwheels = {}
self.ticks = {}
self.load = {}
self.crit = {}
OpenPOWER on IntegriCloud