Print this page
3903 DTrace SCTP Provider
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);
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 253 #define DTRACE_IP(name) \
254 254 DTRACE_PROBE(__ip_##name);
255 255
256 256 #define DTRACE_IP1(name, type1, arg1) \
257 257 DTRACE_PROBE1(__ip_##name, type1, arg1);
258 258
259 259 #define DTRACE_IP2(name, type1, arg1, type2, arg2) \
260 260 DTRACE_PROBE2(__ip_##name, type1, arg1, type2, arg2);
261 261
262 262 #define DTRACE_IP3(name, type1, arg1, type2, arg2, type3, arg3) \
263 263 DTRACE_PROBE3(__ip_##name, type1, arg1, type2, arg2, type3, arg3);
264 264
265 265 #define DTRACE_IP4(name, type1, arg1, type2, arg2, \
266 266 type3, arg3, type4, arg4) \
267 267 DTRACE_PROBE4(__ip_##name, type1, arg1, type2, arg2, \
268 268 type3, arg3, type4, arg4);
269 269
270 270 #define DTRACE_IP5(name, type1, arg1, type2, arg2, \
271 271 type3, arg3, type4, arg4, type5, arg5) \
272 272 DTRACE_PROBE5(__ip_##name, type1, arg1, type2, arg2, \
273 273 type3, arg3, type4, arg4, type5, arg5);
274 274
275 275 #define DTRACE_IP6(name, type1, arg1, type2, arg2, \
276 276 type3, arg3, type4, arg4, type5, arg5, type6, arg6) \
277 277 DTRACE_PROBE6(__ip_##name, type1, arg1, type2, arg2, \
278 278 type3, arg3, type4, arg4, type5, arg5, type6, arg6);
279 279
280 280 #define DTRACE_IP7(name, type1, arg1, type2, arg2, type3, arg3, \
281 281 type4, arg4, type5, arg5, type6, arg6, type7, arg7) \
282 282 DTRACE_PROBE7(__ip_##name, type1, arg1, type2, arg2, \
283 283 type3, arg3, type4, arg4, type5, arg5, type6, arg6, \
284 284 type7, arg7);
285 285
286 286 #define DTRACE_TCP(name) \
287 287 DTRACE_PROBE(__tcp_##name);
288 288
289 289 #define DTRACE_TCP1(name, type1, arg1) \
290 290 DTRACE_PROBE1(__tcp_##name, type1, arg1);
291 291
292 292 #define DTRACE_TCP2(name, type1, arg1, type2, arg2) \
293 293 DTRACE_PROBE2(__tcp_##name, type1, arg1, type2, arg2);
294 294
295 295 #define DTRACE_TCP3(name, type1, arg1, type2, arg2, type3, arg3) \
296 296 DTRACE_PROBE3(__tcp_##name, type1, arg1, type2, arg2, type3, arg3);
297 297
298 298 #define DTRACE_TCP4(name, type1, arg1, type2, arg2, \
299 299 type3, arg3, type4, arg4) \
300 300 DTRACE_PROBE4(__tcp_##name, type1, arg1, type2, arg2, \
301 301 type3, arg3, type4, arg4);
302 302
303 303 #define DTRACE_TCP5(name, type1, arg1, type2, arg2, \
304 304 type3, arg3, type4, arg4, type5, arg5) \
305 305 DTRACE_PROBE5(__tcp_##name, type1, arg1, type2, arg2, \
306 306 type3, arg3, type4, arg4, type5, arg5);
307 307
308 308 #define DTRACE_TCP6(name, type1, arg1, type2, arg2, \
309 309 type3, arg3, type4, arg4, type5, arg5, type6, arg6) \
310 310 DTRACE_PROBE6(__tcp_##name, type1, arg1, type2, arg2, \
311 311 type3, arg3, type4, arg4, type5, arg5, type6, arg6);
312 312
313 313 #define DTRACE_UDP(name) \
314 314 DTRACE_PROBE(__udp_##name);
315 315
316 316 #define DTRACE_UDP1(name, type1, arg1) \
317 317 DTRACE_PROBE1(__udp_##name, type1, arg1);
318 318
319 319 #define DTRACE_UDP2(name, type1, arg1, type2, arg2) \
320 320 DTRACE_PROBE2(__udp_##name, type1, arg1, type2, arg2);
321 321
322 322 #define DTRACE_UDP3(name, type1, arg1, type2, arg2, type3, arg3) \
323 323 DTRACE_PROBE3(__udp_##name, type1, arg1, type2, arg2, type3, arg3);
324 324
↓ open down ↓ |
324 lines elided |
↑ open up ↑ |
325 325 #define DTRACE_UDP4(name, type1, arg1, type2, arg2, \
326 326 type3, arg3, type4, arg4) \
327 327 DTRACE_PROBE4(__udp_##name, type1, arg1, type2, arg2, \
328 328 type3, arg3, type4, arg4);
329 329
330 330 #define DTRACE_UDP5(name, type1, arg1, type2, arg2, \
331 331 type3, arg3, type4, arg4, type5, arg5) \
332 332 DTRACE_PROBE5(__udp_##name, type1, arg1, type2, arg2, \
333 333 type3, arg3, type4, arg4, type5, arg5);
334 334
335 +#define DTRACE_SCTP(name) \
336 + DTRACE_PROBE(__sctp_##name);
337 +
338 +#define DTRACE_SCTP1(name, type1, arg1) \
339 + DTRACE_PROBE1(__sctp_##name, type1, arg1);
340 +
341 +#define DTRACE_SCTP2(name, type1, arg1, type2, arg2) \
342 + DTRACE_PROBE2(__sctp_##name, type1, arg1, type2, arg2);
343 +
344 +#define DTRACE_SCTP3(name, type1, arg1, type2, arg2, type3, arg3) \
345 + DTRACE_PROBE3(__sctp_##name, type1, arg1, type2, arg2, type3, arg3);
346 +
347 +#define DTRACE_SCTP4(name, type1, arg1, type2, arg2, \
348 + type3, arg3, type4, arg4) \
349 + DTRACE_PROBE4(__sctp_##name, type1, arg1, type2, arg2, \
350 + type3, arg3, type4, arg4);
351 +
352 +#define DTRACE_SCTP5(name, type1, arg1, type2, arg2, \
353 + type3, arg3, type4, arg4, type5, arg5) \
354 + DTRACE_PROBE5(__sctp_##name, type1, arg1, type2, arg2, \
355 + type3, arg3, type4, arg4, type5, arg5);
356 +
357 +#define DTRACE_SCTP6(name, type1, arg1, type2, arg2, \
358 + type3, arg3, type4, arg4, type5, arg5, type6, arg6) \
359 + DTRACE_PROBE6(__sctp_##name, type1, arg1, type2, arg2, \
360 + type3, arg3, type4, arg4, type5, arg5, type6, arg6);
335 361
336 362 #define DTRACE_SYSEVENT2(name, type1, arg1, type2, arg2) \
337 363 DTRACE_PROBE2(__sysevent_##name, type1, arg1, type2, arg2);
338 364
339 365 #define DTRACE_XPV(name) \
340 366 DTRACE_PROBE(__xpv_##name);
341 367
342 368 #define DTRACE_XPV1(name, type1, arg1) \
343 369 DTRACE_PROBE1(__xpv_##name, type1, arg1);
344 370
345 371 #define DTRACE_XPV2(name, type1, arg1, type2, arg2) \
346 372 DTRACE_PROBE2(__xpv_##name, type1, arg1, type2, arg2);
347 373
348 374 #define DTRACE_XPV3(name, type1, arg1, type2, arg2, type3, arg3) \
349 375 DTRACE_PROBE3(__xpv_##name, type1, arg1, type2, arg2, type3, arg3);
350 376
351 377 #define DTRACE_XPV4(name, type1, arg1, type2, arg2, type3, arg3, \
352 378 type4, arg4) \
353 379 DTRACE_PROBE4(__xpv_##name, type1, arg1, type2, arg2, \
354 380 type3, arg3, type4, arg4);
355 381
356 382 #define DTRACE_FC_1(name, type1, arg1) \
357 383 DTRACE_PROBE1(__fc_##name, type1, arg1);
358 384
359 385 #define DTRACE_FC_2(name, type1, arg1, type2, arg2) \
360 386 DTRACE_PROBE2(__fc_##name, type1, arg1, type2, arg2);
361 387
362 388 #define DTRACE_FC_3(name, type1, arg1, type2, arg2, type3, arg3) \
363 389 DTRACE_PROBE3(__fc_##name, type1, arg1, type2, arg2, type3, arg3);
364 390
365 391 #define DTRACE_FC_4(name, type1, arg1, type2, arg2, type3, arg3, type4, arg4) \
366 392 DTRACE_PROBE4(__fc_##name, type1, arg1, type2, arg2, type3, arg3, \
367 393 type4, arg4);
368 394
369 395 #define DTRACE_FC_5(name, type1, arg1, type2, arg2, type3, arg3, \
370 396 type4, arg4, type5, arg5) \
371 397 DTRACE_PROBE5(__fc_##name, type1, arg1, type2, arg2, type3, arg3, \
372 398 type4, arg4, type5, arg5);
373 399
374 400 #define DTRACE_SRP_1(name, type1, arg1) \
375 401 DTRACE_PROBE1(__srp_##name, type1, arg1);
376 402
377 403 #define DTRACE_SRP_2(name, type1, arg1, type2, arg2) \
378 404 DTRACE_PROBE2(__srp_##name, type1, arg1, type2, arg2);
379 405
380 406 #define DTRACE_SRP_3(name, type1, arg1, type2, arg2, type3, arg3) \
381 407 DTRACE_PROBE3(__srp_##name, type1, arg1, type2, arg2, type3, arg3);
382 408
383 409 #define DTRACE_SRP_4(name, type1, arg1, type2, arg2, type3, arg3, \
384 410 type4, arg4) \
385 411 DTRACE_PROBE4(__srp_##name, type1, arg1, type2, arg2, \
386 412 type3, arg3, type4, arg4);
387 413
388 414 #define DTRACE_SRP_5(name, type1, arg1, type2, arg2, type3, arg3, \
389 415 type4, arg4, type5, arg5) \
390 416 DTRACE_PROBE5(__srp_##name, type1, arg1, type2, arg2, \
391 417 type3, arg3, type4, arg4, type5, arg5);
392 418
393 419 #define DTRACE_SRP_6(name, type1, arg1, type2, arg2, type3, arg3, \
394 420 type4, arg4, type5, arg5, type6, arg6) \
395 421 DTRACE_PROBE6(__srp_##name, type1, arg1, type2, arg2, \
396 422 type3, arg3, type4, arg4, type5, arg5, type6, arg6);
397 423
398 424 #define DTRACE_SRP_7(name, type1, arg1, type2, arg2, type3, arg3, \
399 425 type4, arg4, type5, arg5, type6, arg6, type7, arg7) \
400 426 DTRACE_PROBE7(__srp_##name, type1, arg1, type2, arg2, \
401 427 type3, arg3, type4, arg4, type5, arg5, type6, arg6, type7, arg7);
402 428
403 429 #define DTRACE_SRP_8(name, type1, arg1, type2, arg2, type3, arg3, \
404 430 type4, arg4, type5, arg5, type6, arg6, type7, arg7, type8, arg8) \
405 431 DTRACE_PROBE8(__srp_##name, type1, arg1, type2, arg2, \
406 432 type3, arg3, type4, arg4, type5, arg5, type6, arg6, \
407 433 type7, arg7, type8, arg8);
408 434
409 435 /*
410 436 * the set-error SDT probe is extra static, in that we declare its fake
411 437 * function literally, rather than with the DTRACE_PROBE1() macro. This is
412 438 * necessary so that SET_ERROR() can evaluate to a value, which wouldn't
413 439 * be possible if it required multiple statements (to declare the function
414 440 * and then call it).
415 441 *
416 442 * SET_ERROR() uses the comma operator so that it can be used without much
417 443 * additional code. For example, "return (EINVAL);" becomes
418 444 * "return (SET_ERROR(EINVAL));". Note that the argument will be evaluated
419 445 * twice, so it should not have side effects (e.g. something like:
420 446 * "return (SET_ERROR(log_error(EINVAL, info)));" would log the error twice).
421 447 */
422 448 extern void __dtrace_probe_set__error(uintptr_t);
423 449 #define SET_ERROR(err) (__dtrace_probe_set__error(err), err)
424 450
425 451 #endif /* _KERNEL */
426 452
427 453 extern const char *sdt_prefix;
428 454
429 455 typedef struct sdt_probedesc {
430 456 char *sdpd_name; /* name of this probe */
431 457 unsigned long sdpd_offset; /* offset of call in text */
432 458 struct sdt_probedesc *sdpd_next; /* next static probe */
433 459 } sdt_probedesc_t;
434 460
435 461 #ifdef __cplusplus
436 462 }
437 463 #endif
438 464
439 465 #endif /* _SYS_SDT_H */
↓ open down ↓ |
95 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX