Print this page
NEX-1643 dtrace provider for smbsrv
Also illumos 1841:
DTrace smb provider was mis-implemented, doesn't exist.
Add back handlers for read/write raw, so that
legacy dtrace consumers can find the probes.
Kill extra arg in smb_negotiate
Fix missing "done" probe with smb_notify
Add example consumer: smb-trace.d
fix soi_pid
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/sdt.h
+++ new/usr/src/uts/common/sys/sdt.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 * Copyright (c) 2013 by Delphix. All rights reserved.
24 24 */
25 25
26 26 #ifndef _SYS_SDT_H
27 27 #define _SYS_SDT_H
28 28
29 29 #include <sys/stdint.h>
30 30
31 31 #ifdef __cplusplus
32 32 extern "C" {
33 33 #endif
34 34
35 35 #ifndef _KERNEL
36 36
37 37 #define DTRACE_PROBE(provider, name) { \
38 38 extern void __dtrace_##provider##___##name(void); \
39 39 __dtrace_##provider##___##name(); \
40 40 }
41 41
42 42 #define DTRACE_PROBE1(provider, name, arg1) { \
43 43 extern void __dtrace_##provider##___##name(unsigned long); \
44 44 __dtrace_##provider##___##name((unsigned long)arg1); \
45 45 }
46 46
47 47 #define DTRACE_PROBE2(provider, name, arg1, arg2) { \
48 48 extern void __dtrace_##provider##___##name(unsigned long, \
49 49 unsigned long); \
50 50 __dtrace_##provider##___##name((unsigned long)arg1, \
51 51 (unsigned long)arg2); \
52 52 }
53 53
54 54 #define DTRACE_PROBE3(provider, name, arg1, arg2, arg3) { \
55 55 extern void __dtrace_##provider##___##name(unsigned long, \
56 56 unsigned long, unsigned long); \
57 57 __dtrace_##provider##___##name((unsigned long)arg1, \
58 58 (unsigned long)arg2, (unsigned long)arg3); \
59 59 }
60 60
61 61 #define DTRACE_PROBE4(provider, name, arg1, arg2, arg3, arg4) { \
62 62 extern void __dtrace_##provider##___##name(unsigned long, \
63 63 unsigned long, unsigned long, unsigned long); \
64 64 __dtrace_##provider##___##name((unsigned long)arg1, \
65 65 (unsigned long)arg2, (unsigned long)arg3, \
66 66 (unsigned long)arg4); \
67 67 }
68 68
69 69 #define DTRACE_PROBE5(provider, name, arg1, arg2, arg3, arg4, arg5) { \
70 70 extern void __dtrace_##provider##___##name(unsigned long, \
71 71 unsigned long, unsigned long, unsigned long, unsigned long);\
72 72 __dtrace_##provider##___##name((unsigned long)arg1, \
73 73 (unsigned long)arg2, (unsigned long)arg3, \
74 74 (unsigned long)arg4, (unsigned long)arg5); \
75 75 }
76 76
77 77 #else /* _KERNEL */
78 78
79 79 #define DTRACE_PROBE(name) { \
80 80 extern void __dtrace_probe_##name(void); \
81 81 __dtrace_probe_##name(); \
82 82 }
83 83
84 84 #define DTRACE_PROBE1(name, type1, arg1) { \
85 85 extern void __dtrace_probe_##name(uintptr_t); \
86 86 __dtrace_probe_##name((uintptr_t)(arg1)); \
87 87 }
88 88
89 89 #define DTRACE_PROBE2(name, type1, arg1, type2, arg2) { \
90 90 extern void __dtrace_probe_##name(uintptr_t, uintptr_t); \
91 91 __dtrace_probe_##name((uintptr_t)(arg1), (uintptr_t)(arg2)); \
92 92 }
93 93
94 94 #define DTRACE_PROBE3(name, type1, arg1, type2, arg2, type3, arg3) { \
95 95 extern void __dtrace_probe_##name(uintptr_t, uintptr_t, uintptr_t); \
96 96 __dtrace_probe_##name((uintptr_t)(arg1), (uintptr_t)(arg2), \
97 97 (uintptr_t)(arg3)); \
98 98 }
99 99
100 100 #define DTRACE_PROBE4(name, type1, arg1, type2, arg2, \
101 101 type3, arg3, type4, arg4) { \
102 102 extern void __dtrace_probe_##name(uintptr_t, uintptr_t, \
103 103 uintptr_t, uintptr_t); \
104 104 __dtrace_probe_##name((uintptr_t)(arg1), (uintptr_t)(arg2), \
105 105 (uintptr_t)(arg3), (uintptr_t)(arg4)); \
106 106 }
107 107
108 108 #define DTRACE_PROBE5(name, type1, arg1, type2, arg2, \
109 109 type3, arg3, type4, arg4, type5, arg5) { \
110 110 extern void __dtrace_probe_##name(uintptr_t, uintptr_t, \
111 111 uintptr_t, uintptr_t, uintptr_t); \
112 112 __dtrace_probe_##name((uintptr_t)(arg1), (uintptr_t)(arg2), \
113 113 (uintptr_t)(arg3), (uintptr_t)(arg4), (uintptr_t)(arg5)); \
114 114 }
115 115
116 116 #define DTRACE_PROBE6(name, type1, arg1, type2, arg2, \
117 117 type3, arg3, type4, arg4, type5, arg5, type6, arg6) { \
118 118 extern void __dtrace_probe_##name(uintptr_t, uintptr_t, \
119 119 uintptr_t, uintptr_t, uintptr_t, uintptr_t); \
120 120 __dtrace_probe_##name((uintptr_t)(arg1), (uintptr_t)(arg2), \
121 121 (uintptr_t)(arg3), (uintptr_t)(arg4), (uintptr_t)(arg5), \
122 122 (uintptr_t)(arg6)); \
123 123 }
124 124
125 125 #define DTRACE_PROBE7(name, type1, arg1, type2, arg2, type3, arg3, \
126 126 type4, arg4, type5, arg5, type6, arg6, type7, arg7) { \
127 127 extern void __dtrace_probe_##name(uintptr_t, uintptr_t, \
128 128 uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); \
129 129 __dtrace_probe_##name((uintptr_t)(arg1), (uintptr_t)(arg2), \
130 130 (uintptr_t)(arg3), (uintptr_t)(arg4), (uintptr_t)(arg5), \
131 131 (uintptr_t)(arg6), (uintptr_t)(arg7)); \
132 132 }
133 133
134 134 #define DTRACE_PROBE8(name, type1, arg1, type2, arg2, type3, arg3, \
135 135 type4, arg4, type5, arg5, type6, arg6, type7, arg7, type8, arg8) { \
136 136 extern void __dtrace_probe_##name(uintptr_t, uintptr_t, \
137 137 uintptr_t, uintptr_t, uintptr_t, uintptr_t, \
138 138 uintptr_t, uintptr_t); \
139 139 __dtrace_probe_##name((uintptr_t)(arg1), (uintptr_t)(arg2), \
140 140 (uintptr_t)(arg3), (uintptr_t)(arg4), (uintptr_t)(arg5), \
141 141 (uintptr_t)(arg6), (uintptr_t)(arg7), (uintptr_t)(arg8)); \
142 142 }
143 143
144 144 #define DTRACE_SCHED(name) \
145 145 DTRACE_PROBE(__sched_##name);
146 146
147 147 #define DTRACE_SCHED1(name, type1, arg1) \
148 148 DTRACE_PROBE1(__sched_##name, type1, arg1);
149 149
150 150 #define DTRACE_SCHED2(name, type1, arg1, type2, arg2) \
151 151 DTRACE_PROBE2(__sched_##name, type1, arg1, type2, arg2);
152 152
153 153 #define DTRACE_SCHED3(name, type1, arg1, type2, arg2, type3, arg3) \
154 154 DTRACE_PROBE3(__sched_##name, type1, arg1, type2, arg2, type3, arg3);
155 155
156 156 #define DTRACE_SCHED4(name, type1, arg1, type2, arg2, \
157 157 type3, arg3, type4, arg4) \
158 158 DTRACE_PROBE4(__sched_##name, type1, arg1, type2, arg2, \
159 159 type3, arg3, type4, arg4);
160 160
161 161 #define DTRACE_PROC(name) \
162 162 DTRACE_PROBE(__proc_##name);
163 163
164 164 #define DTRACE_PROC1(name, type1, arg1) \
165 165 DTRACE_PROBE1(__proc_##name, type1, arg1);
166 166
167 167 #define DTRACE_PROC2(name, type1, arg1, type2, arg2) \
168 168 DTRACE_PROBE2(__proc_##name, type1, arg1, type2, arg2);
169 169
170 170 #define DTRACE_PROC3(name, type1, arg1, type2, arg2, type3, arg3) \
171 171 DTRACE_PROBE3(__proc_##name, type1, arg1, type2, arg2, type3, arg3);
172 172
173 173 #define DTRACE_PROC4(name, type1, arg1, type2, arg2, \
174 174 type3, arg3, type4, arg4) \
175 175 DTRACE_PROBE4(__proc_##name, type1, arg1, type2, arg2, \
176 176 type3, arg3, type4, arg4);
177 177
178 178 #define DTRACE_IO(name) \
179 179 DTRACE_PROBE(__io_##name);
180 180
181 181 #define DTRACE_IO1(name, type1, arg1) \
182 182 DTRACE_PROBE1(__io_##name, type1, arg1);
183 183
184 184 #define DTRACE_IO2(name, type1, arg1, type2, arg2) \
185 185 DTRACE_PROBE2(__io_##name, type1, arg1, type2, arg2);
186 186
187 187 #define DTRACE_IO3(name, type1, arg1, type2, arg2, type3, arg3) \
188 188 DTRACE_PROBE3(__io_##name, type1, arg1, type2, arg2, type3, arg3);
189 189
190 190 #define DTRACE_IO4(name, type1, arg1, type2, arg2, \
191 191 type3, arg3, type4, arg4) \
192 192 DTRACE_PROBE4(__io_##name, type1, arg1, type2, arg2, \
193 193 type3, arg3, type4, arg4);
194 194
195 195 #define DTRACE_ISCSI_2(name, type1, arg1, type2, arg2) \
196 196 DTRACE_PROBE2(__iscsi_##name, type1, arg1, type2, arg2);
197 197
198 198 #define DTRACE_ISCSI_3(name, type1, arg1, type2, arg2, type3, arg3) \
199 199 DTRACE_PROBE3(__iscsi_##name, type1, arg1, type2, arg2, type3, arg3);
200 200
201 201 #define DTRACE_ISCSI_4(name, type1, arg1, type2, arg2, \
202 202 type3, arg3, type4, arg4) \
203 203 DTRACE_PROBE4(__iscsi_##name, type1, arg1, type2, arg2, \
204 204 type3, arg3, type4, arg4);
205 205
206 206 #define DTRACE_ISCSI_5(name, type1, arg1, type2, arg2, \
207 207 type3, arg3, type4, arg4, type5, arg5) \
208 208 DTRACE_PROBE5(__iscsi_##name, type1, arg1, type2, arg2, \
209 209 type3, arg3, type4, arg4, type5, arg5);
210 210
211 211 #define DTRACE_ISCSI_6(name, type1, arg1, type2, arg2, \
212 212 type3, arg3, type4, arg4, type5, arg5, type6, arg6) \
213 213 DTRACE_PROBE6(__iscsi_##name, type1, arg1, type2, arg2, \
214 214 type3, arg3, type4, arg4, type5, arg5, type6, arg6);
215 215
216 216 #define DTRACE_ISCSI_7(name, type1, arg1, type2, arg2, \
217 217 type3, arg3, type4, arg4, type5, arg5, type6, arg6, type7, arg7) \
218 218 DTRACE_PROBE7(__iscsi_##name, type1, arg1, type2, arg2, \
219 219 type3, arg3, type4, arg4, type5, arg5, type6, arg6, \
220 220 type7, arg7);
221 221
222 222 #define DTRACE_ISCSI_8(name, type1, arg1, type2, arg2, \
223 223 type3, arg3, type4, arg4, type5, arg5, type6, arg6, \
224 224 type7, arg7, type8, arg8) \
225 225 DTRACE_PROBE8(__iscsi_##name, type1, arg1, type2, arg2, \
226 226 type3, arg3, type4, arg4, type5, arg5, type6, arg6, \
227 227 type7, arg7, type8, arg8);
228 228
229 229 #define DTRACE_NFSV3_3(name, type1, arg1, type2, arg2, \
230 230 type3, arg3) \
231 231 DTRACE_PROBE3(__nfsv3_##name, type1, arg1, type2, arg2, \
232 232 type3, arg3);
233 233 #define DTRACE_NFSV3_4(name, type1, arg1, type2, arg2, \
234 234 type3, arg3, type4, arg4) \
235 235 DTRACE_PROBE4(__nfsv3_##name, type1, arg1, type2, arg2, \
236 236 type3, arg3, type4, arg4);
237 237
238 238 #define DTRACE_NFSV4_1(name, type1, arg1) \
239 239 DTRACE_PROBE1(__nfsv4_##name, type1, arg1);
240 240
241 241 #define DTRACE_NFSV4_2(name, type1, arg1, type2, arg2) \
242 242 DTRACE_PROBE2(__nfsv4_##name, type1, arg1, type2, arg2);
↓ open down ↓ |
242 lines elided |
↑ open up ↑ |
243 243
244 244 #define DTRACE_NFSV4_3(name, type1, arg1, type2, arg2, type3, arg3) \
245 245 DTRACE_PROBE3(__nfsv4_##name, type1, arg1, type2, arg2, type3, arg3);
246 246
247 247 #define DTRACE_SMB_1(name, type1, arg1) \
248 248 DTRACE_PROBE1(__smb_##name, type1, arg1);
249 249
250 250 #define DTRACE_SMB_2(name, type1, arg1, type2, arg2) \
251 251 DTRACE_PROBE2(__smb_##name, type1, arg1, type2, arg2);
252 252
253 +#define DTRACE_SMB2_1(name, type1, arg1) \
254 + DTRACE_PROBE1(__smb2_##name, type1, arg1);
255 +
256 +#define DTRACE_SMB2_2(name, type1, arg1, type2, arg2) \
257 + DTRACE_PROBE2(__smb2_##name, type1, arg1, type2, arg2);
258 +
253 259 #define DTRACE_IP(name) \
254 260 DTRACE_PROBE(__ip_##name);
255 261
256 262 #define DTRACE_IP1(name, type1, arg1) \
257 263 DTRACE_PROBE1(__ip_##name, type1, arg1);
258 264
259 265 #define DTRACE_IP2(name, type1, arg1, type2, arg2) \
260 266 DTRACE_PROBE2(__ip_##name, type1, arg1, type2, arg2);
261 267
262 268 #define DTRACE_IP3(name, type1, arg1, type2, arg2, type3, arg3) \
263 269 DTRACE_PROBE3(__ip_##name, type1, arg1, type2, arg2, type3, arg3);
264 270
265 271 #define DTRACE_IP4(name, type1, arg1, type2, arg2, \
266 272 type3, arg3, type4, arg4) \
267 273 DTRACE_PROBE4(__ip_##name, type1, arg1, type2, arg2, \
268 274 type3, arg3, type4, arg4);
269 275
270 276 #define DTRACE_IP5(name, type1, arg1, type2, arg2, \
271 277 type3, arg3, type4, arg4, type5, arg5) \
272 278 DTRACE_PROBE5(__ip_##name, type1, arg1, type2, arg2, \
273 279 type3, arg3, type4, arg4, type5, arg5);
274 280
275 281 #define DTRACE_IP6(name, type1, arg1, type2, arg2, \
276 282 type3, arg3, type4, arg4, type5, arg5, type6, arg6) \
277 283 DTRACE_PROBE6(__ip_##name, type1, arg1, type2, arg2, \
278 284 type3, arg3, type4, arg4, type5, arg5, type6, arg6);
279 285
280 286 #define DTRACE_IP7(name, type1, arg1, type2, arg2, type3, arg3, \
281 287 type4, arg4, type5, arg5, type6, arg6, type7, arg7) \
282 288 DTRACE_PROBE7(__ip_##name, type1, arg1, type2, arg2, \
283 289 type3, arg3, type4, arg4, type5, arg5, type6, arg6, \
284 290 type7, arg7);
285 291
286 292 #define DTRACE_TCP(name) \
287 293 DTRACE_PROBE(__tcp_##name);
288 294
289 295 #define DTRACE_TCP1(name, type1, arg1) \
290 296 DTRACE_PROBE1(__tcp_##name, type1, arg1);
291 297
292 298 #define DTRACE_TCP2(name, type1, arg1, type2, arg2) \
293 299 DTRACE_PROBE2(__tcp_##name, type1, arg1, type2, arg2);
294 300
295 301 #define DTRACE_TCP3(name, type1, arg1, type2, arg2, type3, arg3) \
296 302 DTRACE_PROBE3(__tcp_##name, type1, arg1, type2, arg2, type3, arg3);
297 303
298 304 #define DTRACE_TCP4(name, type1, arg1, type2, arg2, \
299 305 type3, arg3, type4, arg4) \
300 306 DTRACE_PROBE4(__tcp_##name, type1, arg1, type2, arg2, \
301 307 type3, arg3, type4, arg4);
302 308
303 309 #define DTRACE_TCP5(name, type1, arg1, type2, arg2, \
304 310 type3, arg3, type4, arg4, type5, arg5) \
305 311 DTRACE_PROBE5(__tcp_##name, type1, arg1, type2, arg2, \
306 312 type3, arg3, type4, arg4, type5, arg5);
307 313
308 314 #define DTRACE_TCP6(name, type1, arg1, type2, arg2, \
309 315 type3, arg3, type4, arg4, type5, arg5, type6, arg6) \
310 316 DTRACE_PROBE6(__tcp_##name, type1, arg1, type2, arg2, \
311 317 type3, arg3, type4, arg4, type5, arg5, type6, arg6);
312 318
313 319 #define DTRACE_UDP(name) \
314 320 DTRACE_PROBE(__udp_##name);
315 321
316 322 #define DTRACE_UDP1(name, type1, arg1) \
317 323 DTRACE_PROBE1(__udp_##name, type1, arg1);
318 324
319 325 #define DTRACE_UDP2(name, type1, arg1, type2, arg2) \
320 326 DTRACE_PROBE2(__udp_##name, type1, arg1, type2, arg2);
321 327
322 328 #define DTRACE_UDP3(name, type1, arg1, type2, arg2, type3, arg3) \
323 329 DTRACE_PROBE3(__udp_##name, type1, arg1, type2, arg2, type3, arg3);
324 330
325 331 #define DTRACE_UDP4(name, type1, arg1, type2, arg2, \
326 332 type3, arg3, type4, arg4) \
327 333 DTRACE_PROBE4(__udp_##name, type1, arg1, type2, arg2, \
328 334 type3, arg3, type4, arg4);
329 335
330 336 #define DTRACE_UDP5(name, type1, arg1, type2, arg2, \
331 337 type3, arg3, type4, arg4, type5, arg5) \
332 338 DTRACE_PROBE5(__udp_##name, type1, arg1, type2, arg2, \
333 339 type3, arg3, type4, arg4, type5, arg5);
334 340
335 341
336 342 #define DTRACE_SYSEVENT2(name, type1, arg1, type2, arg2) \
337 343 DTRACE_PROBE2(__sysevent_##name, type1, arg1, type2, arg2);
338 344
339 345 #define DTRACE_XPV(name) \
340 346 DTRACE_PROBE(__xpv_##name);
341 347
342 348 #define DTRACE_XPV1(name, type1, arg1) \
343 349 DTRACE_PROBE1(__xpv_##name, type1, arg1);
344 350
345 351 #define DTRACE_XPV2(name, type1, arg1, type2, arg2) \
346 352 DTRACE_PROBE2(__xpv_##name, type1, arg1, type2, arg2);
347 353
348 354 #define DTRACE_XPV3(name, type1, arg1, type2, arg2, type3, arg3) \
349 355 DTRACE_PROBE3(__xpv_##name, type1, arg1, type2, arg2, type3, arg3);
350 356
351 357 #define DTRACE_XPV4(name, type1, arg1, type2, arg2, type3, arg3, \
352 358 type4, arg4) \
353 359 DTRACE_PROBE4(__xpv_##name, type1, arg1, type2, arg2, \
354 360 type3, arg3, type4, arg4);
355 361
356 362 #define DTRACE_FC_1(name, type1, arg1) \
357 363 DTRACE_PROBE1(__fc_##name, type1, arg1);
358 364
359 365 #define DTRACE_FC_2(name, type1, arg1, type2, arg2) \
360 366 DTRACE_PROBE2(__fc_##name, type1, arg1, type2, arg2);
361 367
362 368 #define DTRACE_FC_3(name, type1, arg1, type2, arg2, type3, arg3) \
363 369 DTRACE_PROBE3(__fc_##name, type1, arg1, type2, arg2, type3, arg3);
364 370
365 371 #define DTRACE_FC_4(name, type1, arg1, type2, arg2, type3, arg3, type4, arg4) \
366 372 DTRACE_PROBE4(__fc_##name, type1, arg1, type2, arg2, type3, arg3, \
367 373 type4, arg4);
368 374
369 375 #define DTRACE_FC_5(name, type1, arg1, type2, arg2, type3, arg3, \
370 376 type4, arg4, type5, arg5) \
371 377 DTRACE_PROBE5(__fc_##name, type1, arg1, type2, arg2, type3, arg3, \
372 378 type4, arg4, type5, arg5);
373 379
374 380 #define DTRACE_SRP_1(name, type1, arg1) \
375 381 DTRACE_PROBE1(__srp_##name, type1, arg1);
376 382
377 383 #define DTRACE_SRP_2(name, type1, arg1, type2, arg2) \
378 384 DTRACE_PROBE2(__srp_##name, type1, arg1, type2, arg2);
379 385
380 386 #define DTRACE_SRP_3(name, type1, arg1, type2, arg2, type3, arg3) \
381 387 DTRACE_PROBE3(__srp_##name, type1, arg1, type2, arg2, type3, arg3);
382 388
383 389 #define DTRACE_SRP_4(name, type1, arg1, type2, arg2, type3, arg3, \
384 390 type4, arg4) \
385 391 DTRACE_PROBE4(__srp_##name, type1, arg1, type2, arg2, \
386 392 type3, arg3, type4, arg4);
387 393
388 394 #define DTRACE_SRP_5(name, type1, arg1, type2, arg2, type3, arg3, \
389 395 type4, arg4, type5, arg5) \
390 396 DTRACE_PROBE5(__srp_##name, type1, arg1, type2, arg2, \
391 397 type3, arg3, type4, arg4, type5, arg5);
392 398
393 399 #define DTRACE_SRP_6(name, type1, arg1, type2, arg2, type3, arg3, \
394 400 type4, arg4, type5, arg5, type6, arg6) \
395 401 DTRACE_PROBE6(__srp_##name, type1, arg1, type2, arg2, \
396 402 type3, arg3, type4, arg4, type5, arg5, type6, arg6);
397 403
398 404 #define DTRACE_SRP_7(name, type1, arg1, type2, arg2, type3, arg3, \
399 405 type4, arg4, type5, arg5, type6, arg6, type7, arg7) \
400 406 DTRACE_PROBE7(__srp_##name, type1, arg1, type2, arg2, \
401 407 type3, arg3, type4, arg4, type5, arg5, type6, arg6, type7, arg7);
402 408
403 409 #define DTRACE_SRP_8(name, type1, arg1, type2, arg2, type3, arg3, \
404 410 type4, arg4, type5, arg5, type6, arg6, type7, arg7, type8, arg8) \
405 411 DTRACE_PROBE8(__srp_##name, type1, arg1, type2, arg2, \
406 412 type3, arg3, type4, arg4, type5, arg5, type6, arg6, \
407 413 type7, arg7, type8, arg8);
408 414
409 415 /*
410 416 * The set-error SDT probe is extra static, in that we declare its fake
411 417 * function literally, rather than with the DTRACE_PROBE1() macro. This is
412 418 * necessary so that SET_ERROR() can evaluate to a value, which wouldn't
413 419 * be possible if it required multiple statements (to declare the function
414 420 * and then call it).
415 421 *
416 422 * SET_ERROR() uses the comma operator so that it can be used without much
417 423 * additional code. For example, "return (EINVAL);" becomes
418 424 * "return (SET_ERROR(EINVAL));". Note that the argument will be evaluated
419 425 * twice, so it should not have side effects (e.g. something like:
420 426 * "return (SET_ERROR(log_error(EINVAL, info)));" would log the error twice).
421 427 */
422 428 extern void __dtrace_probe_set__error(uintptr_t);
423 429 #define SET_ERROR(err) (__dtrace_probe_set__error(err), err)
424 430
425 431 #endif /* _KERNEL */
426 432
427 433 extern const char *sdt_prefix;
428 434
429 435 typedef struct sdt_probedesc {
430 436 char *sdpd_name; /* name of this probe */
431 437 unsigned long sdpd_offset; /* offset of call in text */
432 438 struct sdt_probedesc *sdpd_next; /* next static probe */
433 439 } sdt_probedesc_t;
434 440
435 441 #ifdef __cplusplus
436 442 }
437 443 #endif
438 444
439 445 #endif /* _SYS_SDT_H */
↓ open down ↓ |
177 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX