Lines Matching +full:d +full:- +full:- +full:- +full:- +full:- +full:0
1 #!/usr/sbin/dtrace -s
3 /*-
4 * Copyright (c) 2012-2016 Ryan Stone
35 * # ./schedgraph.d > /tmp/sched.out
40 #pragma D option quiet
41 #pragma D option bufpolicy=ring
43 inline int TDF_IDLETD = 0x00000020;
49 inline int TDI_SUSPENDED = 0x0001; /* On suspension queue. */
50 inline int TDI_SLEEPING = 0x0002; /* Actually asleep! (tricky). */
51 inline int TDI_SWAPPED = 0x0004; /* Stack not in mem. Bad juju if run. */
52 inline int TDI_LOCK = 0x0008; /* Stopped on a lock. */
53 inline int TDI_IWAIT = 0x0010; /* Awaiting interrupt. */
56 (((td)->td_inhibitors & TDI_SLEEPING) != 0 ? "sleep" : \
57 ((td)->td_inhibitors & TDI_SUSPENDED) != 0 ? "suspended" : \
58 ((td)->td_inhibitors & TDI_SWAPPED) != 0 ? "swapped" : \
59 ((td)->td_inhibitors & TDI_LOCK) != 0 ? "blocked" : \
60 ((td)->td_inhibitors & TDI_IWAIT) != 0 ? "iwait" : "yielding");
63 * NOCPU changed from 255 to -1 at some point. This hacky test will work on a
66 inline int is_nocpu[int cpu] = cpu < 0 || cpu > `mp_maxid;
68 sched:::load-change
69 / is_nocpu[args[0]] /
71 …printf("%d %d KTRGRAPH group:\"load\", id:\"global load\", counter:\"%d\", attributes: \"none\"\n"…
74 sched:::load-change
75 / !is_nocpu[args[0]] /
77 …printf("%d %d KTRGRAPH group:\"load\", id:\"CPU %d load\", counter:\"%d\", attributes: \"none\"\n"…
83 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"proc exit\", attributes: prio:td\n", …
86 proc:::lwp-exit
88 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"exit\", attributes: prio:td\n", cpu, …
91 sched:::change-pri
93 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", point:\"priority change\", attributes: prio:%…
96 sched:::lend-pri
98 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", point:\"lend prio\", attributes: prio:%d, new…
103 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"runq add\", attributes: prio:%d, link…
104 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", point:\"wokeup\", attributes: linkedto:\"%s/%…
109 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"runq rem\", attributes: prio:%d, link…
114 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", point:\"statclock\", attributes: prio:%d, sta…
117 sched:::off-cpu
118 / curthread->td_flags & TDF_IDLETD /
120 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"idle\", attributes: prio:%d\n", cpu, …
123 sched:::off-cpu
124 / (curthread->td_flags & TDF_IDLETD) == 0 /
126 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"%s\", attributes: prio:%d, wmesg:\"%s…
129 sched:::on-cpu
131 …d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"running\", attributes: prio:%d\n", cp…