xref: /xnu-8792.41.9/tools/trace/kqtrace.lua (revision 5c2921b07a2480ab43ec66f5b9e41cb872bc554f)
1*5c2921b0SApple OSS Distributions#!/usr/local/bin/luatrace -s
2*5c2921b0SApple OSS Distributions
3*5c2921b0SApple OSS Distributionstrace_eventname = function(codename, callback)
4*5c2921b0SApple OSS Distributions	local debugid = trace.debugid(codename)
5*5c2921b0SApple OSS Distributions	if debugid ~= 0 then
6*5c2921b0SApple OSS Distributions		trace.single(debugid,callback)
7*5c2921b0SApple OSS Distributions	else
8*5c2921b0SApple OSS Distributions		printf("WARNING: Cannot locate debugid for '%s'\n", codename)
9*5c2921b0SApple OSS Distributions	end
10*5c2921b0SApple OSS Distributionsend
11*5c2921b0SApple OSS Distributions
12*5c2921b0SApple OSS Distributionsinitial_timestamp = 0
13*5c2921b0SApple OSS Distributions
14*5c2921b0SApple OSS Distributionsfunction event_prefix_string(buf, workq)
15*5c2921b0SApple OSS Distributions	if initial_timestamp == 0 then
16*5c2921b0SApple OSS Distributions		initial_timestamp = buf.timestamp
17*5c2921b0SApple OSS Distributions	end
18*5c2921b0SApple OSS Distributions	local secs = trace.convert_timestamp_to_nanoseconds(buf.timestamp - initial_timestamp) / 1000000000
19*5c2921b0SApple OSS Distributions
20*5c2921b0SApple OSS Distributions	local type
21*5c2921b0SApple OSS Distributions	if trace.debugid_is_start(buf.debugid) then
22*5c2921b0SApple OSS Distributions		type = "→"
23*5c2921b0SApple OSS Distributions	elseif trace.debugid_is_end(buf.debugid) then
24*5c2921b0SApple OSS Distributions		type = "←"
25*5c2921b0SApple OSS Distributions	else
26*5c2921b0SApple OSS Distributions		type = "↔"
27*5c2921b0SApple OSS Distributions	end
28*5c2921b0SApple OSS Distributions
29*5c2921b0SApple OSS Distributions	proc = buf.command
30*5c2921b0SApple OSS Distributions
31*5c2921b0SApple OSS Distributions	local prefix = string.format("%s %6.9f %-17s [%05d.%06x] %-28s\t",
32*5c2921b0SApple OSS Distributions		type, secs, proc, buf.pid, buf.threadid, buf.debugname)
33*5c2921b0SApple OSS Distributions	if not workq then
34*5c2921b0SApple OSS Distributions		prefix = prefix .. string.format(" 0x%16x", buf.arg1)
35*5c2921b0SApple OSS Distributions	end
36*5c2921b0SApple OSS Distributions
37*5c2921b0SApple OSS Distributions	return prefix
38*5c2921b0SApple OSS Distributionsend
39*5c2921b0SApple OSS Distributions
40*5c2921b0SApple OSS Distributionsfunction qos_string(qos)
41*5c2921b0SApple OSS Distributions	if qos == 0 then
42*5c2921b0SApple OSS Distributions		return "--"
43*5c2921b0SApple OSS Distributions	elseif qos == 1 then
44*5c2921b0SApple OSS Distributions		return "MT"
45*5c2921b0SApple OSS Distributions	elseif qos == 2 then
46*5c2921b0SApple OSS Distributions		return "BG"
47*5c2921b0SApple OSS Distributions	elseif qos == 3 then
48*5c2921b0SApple OSS Distributions		return "UT"
49*5c2921b0SApple OSS Distributions	elseif qos == 4 then
50*5c2921b0SApple OSS Distributions		return "DF"
51*5c2921b0SApple OSS Distributions	elseif qos == 5 then
52*5c2921b0SApple OSS Distributions		return "IN"
53*5c2921b0SApple OSS Distributions	elseif qos == 6 then
54*5c2921b0SApple OSS Distributions		return "UI"
55*5c2921b0SApple OSS Distributions	elseif qos == 7 then
56*5c2921b0SApple OSS Distributions		return "MG"
57*5c2921b0SApple OSS Distributions	else
58*5c2921b0SApple OSS Distributions		return string.format("??[0x%x]", qos)
59*5c2921b0SApple OSS Distributions	end
60*5c2921b0SApple OSS Distributionsend
61*5c2921b0SApple OSS Distributions
62*5c2921b0SApple OSS Distributionsfunction state_string(strings, state)
63*5c2921b0SApple OSS Distributions	local str = ''
64*5c2921b0SApple OSS Distributions	local first = true
65*5c2921b0SApple OSS Distributions	for name, bit in pairs(strings) do
66*5c2921b0SApple OSS Distributions		if (state & bit) == bit then
67*5c2921b0SApple OSS Distributions			if not first then
68*5c2921b0SApple OSS Distributions				str = str .. ' '
69*5c2921b0SApple OSS Distributions			end
70*5c2921b0SApple OSS Distributions			str = str .. name
71*5c2921b0SApple OSS Distributions			first = false
72*5c2921b0SApple OSS Distributions		end
73*5c2921b0SApple OSS Distributions	end
74*5c2921b0SApple OSS Distributions	return str
75*5c2921b0SApple OSS Distributionsend
76*5c2921b0SApple OSS Distributions
77*5c2921b0SApple OSS Distributionskqrequest_state_strings = {
78*5c2921b0SApple OSS Distributions	['WAKEUP'] = 1,
79*5c2921b0SApple OSS Distributions}
80*5c2921b0SApple OSS Distributions
81*5c2921b0SApple OSS Distributionskqueue_state_strings = {
82*5c2921b0SApple OSS Distributions	['SEL'] = 0x001,
83*5c2921b0SApple OSS Distributions	['SLEEP'] = 0x002,
84*5c2921b0SApple OSS Distributions	['PROCWAIT'] = 0x004,
85*5c2921b0SApple OSS Distributions	['KEV32'] = 0x008,
86*5c2921b0SApple OSS Distributions	['KEV64'] = 0x010,
87*5c2921b0SApple OSS Distributions	['KEV_QOS'] = 0x020,
88*5c2921b0SApple OSS Distributions	['WORKQ'] = 0x040,
89*5c2921b0SApple OSS Distributions	['WORKLOOP'] = 0x080,
90*5c2921b0SApple OSS Distributions	['PROCESSING'] = 0x100,
91*5c2921b0SApple OSS Distributions	['DRAIN'] = 0x200,
92*5c2921b0SApple OSS Distributions	['WAKEUP'] = 0x400,
93*5c2921b0SApple OSS Distributions	['DYNAMIC'] = 0x800,
94*5c2921b0SApple OSS Distributions	['R2K'] = 0x1000,
95*5c2921b0SApple OSS Distributions	['TURNSTILE'] = 0x2000,
96*5c2921b0SApple OSS Distributions}
97*5c2921b0SApple OSS Distributions
98*5c2921b0SApple OSS Distributionsknote_state_strings = {
99*5c2921b0SApple OSS Distributions	['ACTIVE'] = 0x0001,
100*5c2921b0SApple OSS Distributions	['QUEUED'] = 0x0002,
101*5c2921b0SApple OSS Distributions	['DISABLED'] = 0x0004,
102*5c2921b0SApple OSS Distributions	['DROPPING'] = 0x0008,
103*5c2921b0SApple OSS Distributions	['LOCKED'] = 0x0010,
104*5c2921b0SApple OSS Distributions	['POSTING'] = 0x0020,
105*5c2921b0SApple OSS Distributions	['STAYACTIVE'] = 0x0040,
106*5c2921b0SApple OSS Distributions	['DEFERDELETE'] = 0x0080,
107*5c2921b0SApple OSS Distributions	['MERGE_QOS'] = 0x0100,
108*5c2921b0SApple OSS Distributions	['REQVANISH'] = 0x0200,
109*5c2921b0SApple OSS Distributions	['VANISHED'] = 0x0400,
110*5c2921b0SApple OSS Distributions	['SUPPRESSED'] = 0x0800,
111*5c2921b0SApple OSS Distributions}
112*5c2921b0SApple OSS Distributions
113*5c2921b0SApple OSS Distributionskevent_flags_strings = {
114*5c2921b0SApple OSS Distributions	['ADD'] = 0x0001,
115*5c2921b0SApple OSS Distributions	['DELETE'] = 0x0002,
116*5c2921b0SApple OSS Distributions	['ENABLE'] = 0x0004,
117*5c2921b0SApple OSS Distributions	['DISABLE'] = 0x0008,
118*5c2921b0SApple OSS Distributions	['ONESHOT'] = 0x0010,
119*5c2921b0SApple OSS Distributions	['CLEAR'] = 0x0020,
120*5c2921b0SApple OSS Distributions	['RECEIPT'] = 0x0040,
121*5c2921b0SApple OSS Distributions	['DISPATCH'] = 0x0080,
122*5c2921b0SApple OSS Distributions	['UDATA_SPECIFIC'] = 0x0100,
123*5c2921b0SApple OSS Distributions	['VANISHED'] = 0x0200,
124*5c2921b0SApple OSS Distributions	['FLAG0'] = 0x1000,
125*5c2921b0SApple OSS Distributions	['FLAG1'] = 0x2000,
126*5c2921b0SApple OSS Distributions	['EOF'] = 0x8000,
127*5c2921b0SApple OSS Distributions	['ERROR'] = 0x4000,
128*5c2921b0SApple OSS Distributions}
129*5c2921b0SApple OSS Distributions
130*5c2921b0SApple OSS Distributionsfunction kevent_filter_string(filt)
131*5c2921b0SApple OSS Distributions	if filt == -1 then
132*5c2921b0SApple OSS Distributions		return 'READ'
133*5c2921b0SApple OSS Distributions	elseif filt == -2 then
134*5c2921b0SApple OSS Distributions		return 'WRITE'
135*5c2921b0SApple OSS Distributions	elseif filt == -3 then
136*5c2921b0SApple OSS Distributions		return 'AIO'
137*5c2921b0SApple OSS Distributions	elseif filt == -4 then
138*5c2921b0SApple OSS Distributions		return 'VNODE'
139*5c2921b0SApple OSS Distributions	elseif filt == -5 then
140*5c2921b0SApple OSS Distributions		return 'PROC'
141*5c2921b0SApple OSS Distributions	elseif filt == -6 then
142*5c2921b0SApple OSS Distributions		return 'SIGNAL'
143*5c2921b0SApple OSS Distributions	elseif filt == -7 then
144*5c2921b0SApple OSS Distributions		return 'TIMER'
145*5c2921b0SApple OSS Distributions	elseif filt == -8 then
146*5c2921b0SApple OSS Distributions		return 'MACHPORT'
147*5c2921b0SApple OSS Distributions	elseif filt == -9 then
148*5c2921b0SApple OSS Distributions		return 'FS'
149*5c2921b0SApple OSS Distributions	elseif filt == -10 then
150*5c2921b0SApple OSS Distributions		return 'USER'
151*5c2921b0SApple OSS Distributions	-- -11 unused
152*5c2921b0SApple OSS Distributions	elseif filt == -12 then
153*5c2921b0SApple OSS Distributions		return 'VM'
154*5c2921b0SApple OSS Distributions	elseif filt == -13 then
155*5c2921b0SApple OSS Distributions		return 'SOCK'
156*5c2921b0SApple OSS Distributions	elseif filt == -14 then
157*5c2921b0SApple OSS Distributions		return 'MEMORYSTATUS'
158*5c2921b0SApple OSS Distributions	elseif filt == -15 then
159*5c2921b0SApple OSS Distributions		return 'EXCEPT'
160*5c2921b0SApple OSS Distributions	elseif filt == -16 then
161*5c2921b0SApple OSS Distributions		return 'NW_CHANNEL'
162*5c2921b0SApple OSS Distributions	elseif filt == -17 then
163*5c2921b0SApple OSS Distributions		return 'WORKLOOP'
164*5c2921b0SApple OSS Distributions
165*5c2921b0SApple OSS Distributions	elseif filt == 17 then
166*5c2921b0SApple OSS Distributions		return 'KQREAD'
167*5c2921b0SApple OSS Distributions	elseif filt == 18 then
168*5c2921b0SApple OSS Distributions		return 'PIPE_N'
169*5c2921b0SApple OSS Distributions	elseif filt == 19 then
170*5c2921b0SApple OSS Distributions		return 'PIPE_R'
171*5c2921b0SApple OSS Distributions	elseif filt == 20 then
172*5c2921b0SApple OSS Distributions		return 'PIPE_W'
173*5c2921b0SApple OSS Distributions	elseif filt == 21 then
174*5c2921b0SApple OSS Distributions		return 'PTSD'
175*5c2921b0SApple OSS Distributions	elseif filt == 22 then
176*5c2921b0SApple OSS Distributions		return 'SOREAD'
177*5c2921b0SApple OSS Distributions	elseif filt == 23 then
178*5c2921b0SApple OSS Distributions		return 'SOWRITE'
179*5c2921b0SApple OSS Distributions	elseif filt == 24 then
180*5c2921b0SApple OSS Distributions		return 'SCK'
181*5c2921b0SApple OSS Distributions	elseif filt == 25 then
182*5c2921b0SApple OSS Distributions		return 'SOEXCEPT'
183*5c2921b0SApple OSS Distributions	elseif filt == 26 then
184*5c2921b0SApple OSS Distributions		return 'SPEC'
185*5c2921b0SApple OSS Distributions	elseif filt == 27 then
186*5c2921b0SApple OSS Distributions		return 'BPFREAD'
187*5c2921b0SApple OSS Distributions	elseif filt == 28 then
188*5c2921b0SApple OSS Distributions		return 'NECP_FD'
189*5c2921b0SApple OSS Distributions	elseif filt == 29 then
190*5c2921b0SApple OSS Distributions		return 'SKYWALK_CHANNEL_W'
191*5c2921b0SApple OSS Distributions	elseif filt == 30 then
192*5c2921b0SApple OSS Distributions		return 'SKYWALK_CHANNEL_R'
193*5c2921b0SApple OSS Distributions	elseif filt == 31 then
194*5c2921b0SApple OSS Distributions		return 'SKYWALK_CHANNEL_E'
195*5c2921b0SApple OSS Distributions	elseif filt == 32 then
196*5c2921b0SApple OSS Distributions		return 'FSEVENT'
197*5c2921b0SApple OSS Distributions	elseif filt == 33 then
198*5c2921b0SApple OSS Distributions		return 'VN'
199*5c2921b0SApple OSS Distributions	elseif filt == 34 then
200*5c2921b0SApple OSS Distributions		return 'TTY'
201*5c2921b0SApple OSS Distributions	elseif filt == 35 then
202*5c2921b0SApple OSS Distributions		return 'PTMX'
203*5c2921b0SApple OSS Distributions	elseif filt == 36 then
204*5c2921b0SApple OSS Distributions		return 'DETACHED'
205*5c2921b0SApple OSS Distributions	else
206*5c2921b0SApple OSS Distributions		return string.format('[%d]', filt)
207*5c2921b0SApple OSS Distributions	end
208*5c2921b0SApple OSS Distributionsend
209*5c2921b0SApple OSS Distributions
210*5c2921b0SApple OSS Distributions-- kqueue lifecycle
211*5c2921b0SApple OSS Distributions
212*5c2921b0SApple OSS Distributionsfunction processing_begin(workq)
213*5c2921b0SApple OSS Distributions	return function(buf)
214*5c2921b0SApple OSS Distributions		local prefix = event_prefix_string(buf, workq)
215*5c2921b0SApple OSS Distributions		if trace.debugid_is_start(buf.debugid) then
216*5c2921b0SApple OSS Distributions			local qos
217*5c2921b0SApple OSS Distributions			if workq then
218*5c2921b0SApple OSS Distributions				qos = buf.arg2
219*5c2921b0SApple OSS Distributions			else
220*5c2921b0SApple OSS Distributions				qos = buf.arg3
221*5c2921b0SApple OSS Distributions			end
222*5c2921b0SApple OSS Distributions			printf("%s QoS = %s\n", prefix, qos_string(qos))
223*5c2921b0SApple OSS Distributions		else
224*5c2921b0SApple OSS Distributions			printf("%s request thread = 0x%x, kqrequest state = %s\n", prefix,
225*5c2921b0SApple OSS Distributions					buf.arg1, state_string(kqrequest_state_strings, buf.arg2))
226*5c2921b0SApple OSS Distributions		end
227*5c2921b0SApple OSS Distributions	end
228*5c2921b0SApple OSS Distributionsend
229*5c2921b0SApple OSS Distributions
230*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kq_processing_begin", processing_begin(false))
231*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwq_processing_begin", processing_begin(true))
232*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwl_processing_begin", processing_begin(false))
233*5c2921b0SApple OSS Distributions
234*5c2921b0SApple OSS Distributionsfunction processing_end(workq)
235*5c2921b0SApple OSS Distributions	return function(buf)
236*5c2921b0SApple OSS Distributions		local qos
237*5c2921b0SApple OSS Distributions		if workq then
238*5c2921b0SApple OSS Distributions			qos = buf.arg2
239*5c2921b0SApple OSS Distributions		else
240*5c2921b0SApple OSS Distributions			qos = buf.arg3
241*5c2921b0SApple OSS Distributions		end
242*5c2921b0SApple OSS Distributions		printf("%s QoS = %s\n", event_prefix_string(buf, workq), qos_string(qos))
243*5c2921b0SApple OSS Distributions	end
244*5c2921b0SApple OSS Distributionsend
245*5c2921b0SApple OSS Distributions
246*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kq_processing_end", processing_end(false))
247*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwq_processing_end", processing_end(true))
248*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwl_processing_end", processing_end(false))
249*5c2921b0SApple OSS Distributions
250*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwq_bind", function(buf)
251*5c2921b0SApple OSS Distributions	printf("%s thread = 0x%x, QoS = %s, kqrequest state = %s\n",
252*5c2921b0SApple OSS Distributions			event_prefix_string(buf, true), buf.arg1, qos_string(buf.arg3),
253*5c2921b0SApple OSS Distributions			state_string(kqrequest_state_strings, buf.arg4))
254*5c2921b0SApple OSS Distributionsend)
255*5c2921b0SApple OSS Distributions
256*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwq_unbind", function(buf)
257*5c2921b0SApple OSS Distributions	printf("%s thread = 0x%x, QoS = %s\n", event_prefix_string(buf, true),
258*5c2921b0SApple OSS Distributions			buf.arg1, qos_string(buf.arg3))
259*5c2921b0SApple OSS Distributionsend)
260*5c2921b0SApple OSS Distributions
261*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwl_bind", function(buf)
262*5c2921b0SApple OSS Distributions	qos = buf.arg3 & 0xff
263*5c2921b0SApple OSS Distributions	duplicate = buf.arg3 & (1 << 8)
264*5c2921b0SApple OSS Distributions	kqr_override_qos_delta = buf.arg4 >> 8
265*5c2921b0SApple OSS Distributions	kqr_state = buf.arg4 & 0xff
266*5c2921b0SApple OSS Distributions
267*5c2921b0SApple OSS Distributions	printf("%s thread = 0x%x, QoS = %s, override QoS delta = %d, kqrequest state = %s%s\n",
268*5c2921b0SApple OSS Distributions			event_prefix_string(buf, false), buf.arg2, qos_string(qos),
269*5c2921b0SApple OSS Distributions			kqr_override_qos_delta,
270*5c2921b0SApple OSS Distributions			state_string(kqrequest_state_strings, kqr_state),
271*5c2921b0SApple OSS Distributions			duplicate and ", duplicate" or "")
272*5c2921b0SApple OSS Distributionsend)
273*5c2921b0SApple OSS Distributions
274*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwl_unbind", function(buf)
275*5c2921b0SApple OSS Distributions	flags = buf.arg3
276*5c2921b0SApple OSS Distributions	qos = buf.arg4
277*5c2921b0SApple OSS Distributions
278*5c2921b0SApple OSS Distributions	printf("%s thread = 0x%x, QoS = %s, flags = 0x%x\n", event_prefix_string(buf, false),
279*5c2921b0SApple OSS Distributions			buf.arg2, qos_string(qos), flags)
280*5c2921b0SApple OSS Distributionsend)
281*5c2921b0SApple OSS Distributions
282*5c2921b0SApple OSS Distributionsfunction thread_request(workq)
283*5c2921b0SApple OSS Distributions	return function(buf)
284*5c2921b0SApple OSS Distributions		printf("%s QoS = %s, kqrequest state = %s, override QoS delta = %d\n",
285*5c2921b0SApple OSS Distributions				event_prefix_string(buf, workq), qos_string(buf.arg2),
286*5c2921b0SApple OSS Distributions				state_string(kqrequest_state_strings, buf.arg3), buf.arg3 >> 8)
287*5c2921b0SApple OSS Distributions	end
288*5c2921b0SApple OSS Distributionsend
289*5c2921b0SApple OSS Distributions
290*5c2921b0SApple OSS Distributionsfunction thread_adjust(buf)
291*5c2921b0SApple OSS Distributions	tid = buf.arg2
292*5c2921b0SApple OSS Distributions	kqr_qos = buf.arg3 >> 8
293*5c2921b0SApple OSS Distributions	new_qos = buf.arg3 & 0xff
294*5c2921b0SApple OSS Distributions	kqr_qos_override = buf.arg4 >> 8
295*5c2921b0SApple OSS Distributions	kqr_state = buf.arg4 & 0xff
296*5c2921b0SApple OSS Distributions
297*5c2921b0SApple OSS Distributions	printf("%s thread = 0x%x, old/new QoS = %s/%s, old/new override QoS delta = %d/%d, kqrequest state = %s\n",
298*5c2921b0SApple OSS Distributions			event_prefix_string(buf, false),
299*5c2921b0SApple OSS Distributions			tid,
300*5c2921b0SApple OSS Distributions			qos_string(kqr_qos),
301*5c2921b0SApple OSS Distributions			qos_string(new_qos),
302*5c2921b0SApple OSS Distributions			kqr_qos_override,
303*5c2921b0SApple OSS Distributions			new_qos - kqr_qos,
304*5c2921b0SApple OSS Distributions			state_string(kqrequest_state_strings, kqr_state))
305*5c2921b0SApple OSS Distributionsend
306*5c2921b0SApple OSS Distributions
307*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwq_thread_request", thread_request(true))
308*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwl_thread_request", thread_request(false))
309*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwl_thread_adjust", thread_adjust)
310*5c2921b0SApple OSS Distributions
311*5c2921b0SApple OSS Distributionsfunction kevent_register(workq)
312*5c2921b0SApple OSS Distributions	return function(buf)
313*5c2921b0SApple OSS Distributions		printf("%s kevent udata = 0x%x, kevent filter = %s, kevent flags = %s\n",
314*5c2921b0SApple OSS Distributions				event_prefix_string(buf, workq), buf.arg2,
315*5c2921b0SApple OSS Distributions				kevent_filter_string(buf.arg4),
316*5c2921b0SApple OSS Distributions				state_string(kevent_flags_strings, buf.arg3))
317*5c2921b0SApple OSS Distributions	end
318*5c2921b0SApple OSS Distributionsend
319*5c2921b0SApple OSS Distributions
320*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kq_register", kevent_register(false))
321*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwq_register", kevent_register(true))
322*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwl_register", kevent_register(false))
323*5c2921b0SApple OSS Distributions
324*5c2921b0SApple OSS Distributionsfunction kevent_process(workq)
325*5c2921b0SApple OSS Distributions	return function(buf)
326*5c2921b0SApple OSS Distributions		printf("%s kevent ident = 0x%x, udata = 0x%x, kevent filter = %s, knote status = %s\n",
327*5c2921b0SApple OSS Distributions				event_prefix_string(buf, workq), buf.arg3 >> 32, buf.arg2,
328*5c2921b0SApple OSS Distributions				kevent_filter_string(buf.arg4),
329*5c2921b0SApple OSS Distributions				state_string(knote_state_strings, buf.arg3 & 0xffffffff))
330*5c2921b0SApple OSS Distributions	end
331*5c2921b0SApple OSS Distributionsend
332*5c2921b0SApple OSS Distributions
333*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kq_process", kevent_process(false))
334*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwq_process", kevent_process(true))
335*5c2921b0SApple OSS Distributionstrace_eventname("KEVENT_kqwl_process", kevent_process(false))
336