Move declarations to global header
[lttng-modules.git] / probes / lttng-events.h
CommitLineData
d0dd2ecb 1#include <linux/debugfs.h>
c0edae1d
MD
2#include "lttng.h"
3#include "lttng-types.h"
b13f3ebe 4#include "../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
f3bc08c5 5#include "../wrapper/ringbuffer/frontend_types.h"
e763dbf5 6#include "../ltt-events.h"
6db3d13b 7#include "../ltt-tracer-core.h"
40652b65 8
40652b65 9/*
6db3d13b 10 * Macro declarations used for all stages.
40652b65
MD
11 */
12
13/*
14 * DECLARE_EVENT_CLASS can be used to add a generic function
15 * handlers for events. That is, if all events have the same
16 * parameters and just have distinct trace points.
17 * Each tracepoint can be defined with DEFINE_EVENT and that
18 * will map the DECLARE_EVENT_CLASS to the tracepoint.
19 *
20 * TRACE_EVENT is a one to one mapping between tracepoint and template.
21 */
6db3d13b 22
40652b65
MD
23#undef TRACE_EVENT
24#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
25 DECLARE_EVENT_CLASS(name, \
26 PARAMS(proto), \
27 PARAMS(args), \
28 PARAMS(tstruct), \
29 PARAMS(assign), \
299338c8
MD
30 PARAMS(print)) \
31 DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args))
40652b65 32
6db3d13b
MD
33#undef DEFINE_EVENT_PRINT
34#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
35 DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
36
37/* Callbacks are meaningless to LTTng. */
38#undef TRACE_EVENT_FN
39#define TRACE_EVENT_FN(name, proto, args, tstruct, \
40 assign, print, reg, unreg) \
41 TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \
42 PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \
43
f62b389e
MD
44/*
45 * Stage 0.1 of the trace events.
46 *
47 * Create dummy trace calls for each events, verifying that the LTTng module
48 * TRACE_EVENT headers match the kernel arguments. Will be optimized out by the
49 * compiler.
50 */
51
52#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */
53
54#undef TP_PROTO
55#define TP_PROTO(args...) args
56
57#undef TP_ARGS
58#define TP_ARGS(args...) args
59
60#undef DEFINE_EVENT
61#define DEFINE_EVENT(_template, _name, _proto, _args) \
7eb827f2 62void trace_##_name(_proto);
f62b389e
MD
63
64#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
65
6db3d13b
MD
66/*
67 * Stage 1 of the trace events.
68 *
69 * Create event field type metadata section.
70 * Each event produce an array of fields.
71 */
72
73#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */
74
1d12cebd
MD
75/* Named field types must be defined in lttng-types.h */
76
40652b65 77#undef __field
299338c8
MD
78#define __field(_type, _item) \
79 { .name = #_item, .type = { .atype = atype_integer, .name = #_type} },
40652b65
MD
80
81#undef __field_ext
6db3d13b 82#define __field_ext(_type, _item, _filter_type) __field(_type, _item)
40652b65
MD
83
84#undef __array
299338c8
MD
85#define __array(_type, _item, _length) \
86 { \
87 .name = #_item, \
88 .type = { \
89 .atype = atype_array, \
90 .name = NULL, \
91 .u.array.elem_type = #_type, \
92 .u.array.length = _length, \
93 }, \
94 },
40652b65
MD
95
96#undef __dynamic_array
299338c8
MD
97#define __dynamic_array(_type, _item, _length) \
98 { \
99 .name = #_item, \
100 .type = { \
101 .atype = atype_sequence, \
102 .name = NULL, \
103 .u.sequence.elem_type = #_type, \
104 .u.sequence.length_type = "u32", \
105 }, \
106 },
40652b65
MD
107
108#undef __string
1d12cebd 109#define __string(_item, _src) \
299338c8 110 { \
0d1d4002 111 .name = #_item, \
299338c8
MD
112 .type = { \
113 .atype = atype_string, \
114 .name = NULL, \
115 .u.string.encoding = lttng_encode_UTF8, \
116 }, \
117 },
1d12cebd 118
40652b65 119#undef TP_STRUCT__entry
1d12cebd
MD
120#define TP_STRUCT__entry(args...) args /* Only one used in this phase */
121
40652b65 122#undef DECLARE_EVENT_CLASS
0d1d4002
MD
123#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
124 static const struct lttng_event_field __event_fields___##_name[] = { \
125 _tstruct \
299338c8
MD
126 };
127
299338c8
MD
128#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
129
19c57fbf
MD
130/*
131 * Stage 1.1 of the trace events.
132 *
133 * Create probe callback prototypes.
134 */
135
136#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */
137
138#undef TP_PROTO
139#define TP_PROTO(args...) args
140
141#undef DECLARE_EVENT_CLASS
142#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
143static void __event_probe__##_name(void *__data, _proto);
144
145#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
146
299338c8
MD
147/*
148 * Stage 2 of the trace events.
149 *
150 * Create an array of events.
151 */
152
299338c8
MD
153/* Named field types must be defined in lttng-types.h */
154
6db3d13b 155#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */
299338c8 156
d32a57a2
MD
157#undef DEFINE_EVENT
158#define DEFINE_EVENT(_template, _name, _proto, _args) \
159 { \
160 .fields = __event_fields___##_template, \
161 .name = #_name, \
19c57fbf 162 .probe_callback = (void *) &__event_probe__##_template,\
d32a57a2 163 .nr_fields = ARRAY_SIZE(__event_fields___##_template), \
6db3d13b 164 },
40652b65 165
d0dd2ecb
MD
166#define TP_ID1(_token, _system) _token##_system
167#define TP_ID(_token, _system) TP_ID1(_token, _system)
40652b65 168
d0dd2ecb 169static const struct lttng_event_desc TP_ID(__event_desc___, TRACE_SYSTEM)[] = {
40652b65 170#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
299338c8
MD
171};
172
d0dd2ecb
MD
173#undef TP_ID1
174#undef TP_ID
175
176/*
177 * Stage 3 of the trace events.
178 *
179 * Create seq file metadata output.
180 */
181
d0dd2ecb
MD
182#define TP_ID1(_token, _system) _token##_system
183#define TP_ID(_token, _system) TP_ID1(_token, _system)
d0dd2ecb
MD
184
185static void *TP_ID(__lttng_seq_start__, TRACE_SYSTEM)(struct seq_file *m,
186 loff_t *pos)
187{
6db3d13b
MD
188 const struct lttng_event_desc *desc =
189 &TP_ID(__event_desc___, TRACE_SYSTEM)[*pos];
d0dd2ecb 190
6db3d13b
MD
191 if (desc > &TP_ID(__event_desc___, TRACE_SYSTEM)
192 [ARRAY_SIZE(TP_ID(__event_desc___, TRACE_SYSTEM)) - 1])
d0dd2ecb
MD
193 return NULL;
194 return (void *) desc;
195}
196
197static void *TP_ID(__lttng_seq_next__, TRACE_SYSTEM)(struct seq_file *m,
198 void *p, loff_t *ppos)
199{
6db3d13b
MD
200 const struct lttng_event_desc *desc =
201 &TP_ID(__event_desc___, TRACE_SYSTEM)[++(*ppos)];
d0dd2ecb 202
6db3d13b
MD
203 if (desc > &TP_ID(__event_desc___, TRACE_SYSTEM)
204 [ARRAY_SIZE(TP_ID(__event_desc___, TRACE_SYSTEM)) - 1])
d0dd2ecb
MD
205 return NULL;
206 return (void *) desc;
207}
208
209static void TP_ID(__lttng_seq_stop__, TRACE_SYSTEM)(struct seq_file *m,
210 void *p)
211{
212}
213
214static int TP_ID(__lttng_seq_show__, TRACE_SYSTEM)(struct seq_file *m,
215 void *p)
216{
217 const struct lttng_event_desc *desc = p;
218 int i;
219
220 seq_printf(m, "event {\n"
221 "\tname = %s;\n"
222 "\tid = UNKNOWN;\n"
223 "\tstream = UNKNOWN;\n"
224 "\tfields = {\n",
225 desc->name);
226 for (i = 0; i < desc->nr_fields; i++) {
227 if (desc->fields[i].type.name) /* Named type */
228 seq_printf(m, "\t\t%s",
229 desc->fields[i].type.name);
230 else /* Nameless type */
231 lttng_print_event_type(m, 2, &desc->fields[i].type);
232 seq_printf(m, " %s;\n", desc->fields[i].name);
233 }
234 seq_printf(m, "\t};\n");
235 seq_printf(m, "};\n");
236 return 0;
237}
238
239static const
240struct seq_operations TP_ID(__lttng_types_seq_ops__, TRACE_SYSTEM) = {
241 .start = TP_ID(__lttng_seq_start__, TRACE_SYSTEM),
242 .next = TP_ID(__lttng_seq_next__, TRACE_SYSTEM),
243 .stop = TP_ID(__lttng_seq_stop__, TRACE_SYSTEM),
244 .show = TP_ID(__lttng_seq_show__, TRACE_SYSTEM),
245};
246
247static int
248TP_ID(__lttng_types_open__, TRACE_SYSTEM)(struct inode *inode, struct file *file)
249{
250 return seq_open(file, &TP_ID(__lttng_types_seq_ops__, TRACE_SYSTEM));
251}
252
6db3d13b
MD
253static const
254struct file_operations TP_ID(__lttng_types_fops__, TRACE_SYSTEM) = {
d0dd2ecb
MD
255 .open = TP_ID(__lttng_types_open__, TRACE_SYSTEM),
256 .read = seq_read,
257 .llseek = seq_lseek,
258 .release = seq_release_private,
259};
260
261static struct dentry *TP_ID(__lttng_types_dentry__, TRACE_SYSTEM);
262
263static int TP_ID(__lttng_types_init__, TRACE_SYSTEM)(void)
264{
265 int ret = 0;
266
267 TP_ID(__lttng_types_dentry__, TRACE_SYSTEM) =
6db3d13b
MD
268 debugfs_create_file("lttng-events-" __stringify(TRACE_SYSTEM),
269 S_IWUSR, NULL, NULL,
270 &TP_ID(__lttng_types_fops__, TRACE_SYSTEM));
d0dd2ecb
MD
271 if (IS_ERR(TP_ID(__lttng_types_dentry__, TRACE_SYSTEM))
272 || !TP_ID(__lttng_types_dentry__, TRACE_SYSTEM)) {
273 printk(KERN_ERR "Error creating LTTng type export file\n");
274 ret = -ENOMEM;
275 goto error;
276 }
277error:
278 return ret;
279}
280
d0dd2ecb
MD
281static void TP_ID(__lttng_types_exit__, TRACE_SYSTEM)(void)
282{
283 debugfs_remove(TP_ID(__lttng_types_dentry__, TRACE_SYSTEM));
284}
285
d0dd2ecb
MD
286#undef TP_ID1
287#undef TP_ID
288
40652b65 289/*
6db3d13b 290 * Stage 4 of the trace events.
40652b65
MD
291 *
292 * Create static inline function that calculates event size.
293 */
294
6db3d13b 295#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */
40652b65 296
6db3d13b
MD
297/* Named field types must be defined in lttng-types.h */
298
299#undef __field
85a80742
MD
300#define __field(_type, _item) \
301 __event_len += lib_ring_buffer_align(__event_len, __alignof__(_type)); \
0d1d4002 302 __event_len += sizeof(_type);
6db3d13b
MD
303
304#undef __field_ext
305#define __field_ext(_type, _item, _filter_type) __field(_type, _item)
306
307#undef __array
85a80742
MD
308#define __array(_type, _item, _length) \
309 __event_len += lib_ring_buffer_align(__event_len, __alignof__(_type)); \
0d1d4002 310 __event_len += sizeof(_type) * (_length);
6db3d13b
MD
311
312#undef __dynamic_array
85a80742
MD
313#define __dynamic_array(_type, _item, _length) \
314 __event_len += lib_ring_buffer_align(__event_len, __alignof__(u32)); \
315 __event_len += sizeof(u32); \
316 __event_len += lib_ring_buffer_align(__event_len, __alignof__(_type)); \
0d1d4002 317 __event_len += sizeof(_type) * (_length);
6db3d13b
MD
318
319#undef __string
85a80742 320#define __string(_item, _src) \
0d1d4002
MD
321 __event_len += __dynamic_len[__dynamic_len_idx++] = strlen(_src) + 1;
322
323#undef TP_PROTO
324#define TP_PROTO(args...) args
6db3d13b
MD
325
326#undef TP_STRUCT__entry
0d1d4002 327#define TP_STRUCT__entry(args...) args
6db3d13b
MD
328
329#undef DECLARE_EVENT_CLASS
0d1d4002
MD
330#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
331static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \
332{ \
333 size_t __event_len = 0; \
334 unsigned int __dynamic_len_idx = 0; \
335 \
336 if (0) \
337 (void) __dynamic_len_idx; /* don't warn if unused */ \
338 _tstruct \
339 return __event_len; \
6db3d13b 340}
40652b65
MD
341
342#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
343
6db3d13b 344
6db3d13b 345
40652b65 346/*
e763dbf5
MD
347 * Stage 5 of the trace events.
348 *
349 * Create static inline function that calculates event payload alignment.
350 */
351
352#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */
353
354/* Named field types must be defined in lttng-types.h */
355
356#undef __field
357#define __field(_type, _item) \
67e5e60c 358 __event_align = max_t(size_t, __event_align, __alignof__(_type));
e763dbf5
MD
359
360#undef __field_ext
361#define __field_ext(_type, _item, _filter_type) __field(_type, _item)
362
363#undef __array
364#define __array(_type, _item, _length) \
67e5e60c 365 __event_align = max_t(size_t, __event_align, __alignof__(_type));
e763dbf5
MD
366
367#undef __dynamic_array
368#define __dynamic_array(_type, _item, _length) \
67e5e60c
MD
369 __event_align = max_t(size_t, __event_align, __alignof__(u32)); \
370 __event_align = max_t(size_t, __event_align, __alignof__(_type));
e763dbf5
MD
371
372#undef __string
373#define __string(_item, _src)
374
375#undef TP_PROTO
376#define TP_PROTO(args...) args
377
378#undef TP_STRUCT__entry
379#define TP_STRUCT__entry(args...) args
380
381#undef DECLARE_EVENT_CLASS
382#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
383static inline size_t __event_get_align__##_name(_proto) \
384{ \
385 size_t __event_align = 1; \
386 _tstruct \
387 return __event_align; \
388}
389
390#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
391
392
e763dbf5
MD
393/*
394 * Stage 6 of the trace events.
40652b65 395 *
3c4ffab9
MD
396 * Create structure declaration that allows the "assign" macros to access the
397 * field types.
398 */
399
400#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */
401
402/* Named field types must be defined in lttng-types.h */
403
404#undef __field
405#define __field(_type, _item) _type _item;
406
407#undef __field_ext
408#define __field_ext(_type, _item, _filter_type) __field(_type, _item)
409
410#undef __array
411#define __array(_type, _item, _length) _type _item;
412
413#undef __dynamic_array
414#define __dynamic_array(_type, _item, _length) _type _item;
415
416#undef __string
417#define __string(_item, _src) char _item;
418
419#undef TP_STRUCT__entry
420#define TP_STRUCT__entry(args...) args
421
422#undef DECLARE_EVENT_CLASS
423#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
424struct __event_typemap__##_name { \
425 _tstruct \
426};
427
428#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
429
430
431/*
432 * Stage 7 of the trace events.
433 *
40652b65
MD
434 * Create the probe function : call even size calculation and write event data
435 * into the buffer.
e763dbf5 436 *
67e5e60c
MD
437 * We use both the field and assignment macros to write the fields in the order
438 * defined in the field declaration. The field declarations control the
439 * execution order, jumping to the appropriate assignment block.
40652b65
MD
440 */
441
e763dbf5
MD
442#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */
443
444#undef __field
445#define __field(_type, _item) \
e763dbf5
MD
446 goto __assign_##_item; \
447__end_field_##_item:
40652b65 448
e763dbf5
MD
449#undef __field_ext
450#define __field_ext(_type, _item, _filter_type) __field(_type, _item)
40652b65 451
e763dbf5
MD
452#undef __array
453#define __array(_type, _item, _length) \
e763dbf5
MD
454 goto __assign_##_item; \
455__end_field_##_item:
40652b65 456
e763dbf5
MD
457#undef __dynamic_array
458#define __dynamic_array(_type, _item, _length) \
e763dbf5
MD
459 goto __assign_##_item##_1; \
460__end_field_##_item##_1: \
e763dbf5
MD
461 goto __assign_##_item##_2; \
462__end_field_##_item##_2:
40652b65 463
e763dbf5
MD
464#undef __string
465#define __string(_item, _src) \
466 goto __assign_##_item; \
467__end_field_##_item:
468
469/*
470 * Macros mapping tp_assign() to "=", tp_memcpy() to memcpy() and tp_strcpy() to
471 * strcpy().
472 */
473#undef tp_assign
474#define tp_assign(dest, src) \
475__assign_##dest: \
476 { \
3c4ffab9
MD
477 __typeof__(__typemap.dest) __tmp = (src); \
478 lib_ring_buffer_align_ctx(&ctx, __alignof__(__tmp)); \
479 __chan->ops->event_write(&ctx, &__tmp, sizeof(__tmp)); \
e763dbf5
MD
480 } \
481 goto __end_field_##dest;
482
483#undef tp_memcpy
484#define tp_memcpy(dest, src, len) \
485__assign_##dest: \
3c4ffab9 486 lib_ring_buffer_align_ctx(&ctx, __alignof__(__typemap.dest)); \
e763dbf5
MD
487 __chan->ops->event_write(&ctx, src, len); \
488 goto __end_field_##dest;
489
490#undef tp_memcpy_dyn
491#define tp_memcpy_dyn(dest, src, len) \
492__assign_##dest##_1: \
493 { \
3c4ffab9
MD
494 u32 __tmpl = (len); \
495 lib_ring_buffer_align_ctx(&ctx, __alignof__(u32)); \
e763dbf5
MD
496 __chan->ops->event_write(&ctx, &__tmpl, sizeof(u32)); \
497 } \
498 goto __end_field_##dest##_1; \
499__assign_##dest##_2: \
3c4ffab9 500 lib_ring_buffer_align_ctx(&ctx, __alignof__(__typemap.dest)); \
e763dbf5
MD
501 __chan->ops->event_write(&ctx, src, len); \
502 goto __end_field_##dest##_2;
503
504#undef tp_strcpy
505#define tp_strcpy(dest, src) \
3c4ffab9 506 tp_memcpy(dest, src, __get_dynamic_array_len(dest))
40652b65 507
e763dbf5
MD
508/* Named field types must be defined in lttng-types.h */
509
510#undef __get_str
511#define __get_str(field) field
512
513#undef __get_dynamic_array
514#define __get_dynamic_array(field) field
515
516/* Beware: this get len actually consumes the len value */
517#undef __get_dynamic_array_len
518#define __get_dynamic_array_len(field) __dynamic_len[__dynamic_len_idx++]
519
520#undef TP_PROTO
521#define TP_PROTO(args...) args
522
523#undef TP_ARGS
524#define TP_ARGS(args...) args
525
526#undef TP_STRUCT__entry
527#define TP_STRUCT__entry(args...) args
528
529#undef TP_fast_assign
530#define TP_fast_assign(args...) args
531
532#undef DECLARE_EVENT_CLASS
533#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
534static void __event_probe__##_name(void *__data, _proto) \
535{ \
536 struct ltt_event *__event = __data; \
537 struct ltt_channel *__chan = __event->chan; \
538 struct lib_ring_buffer_ctx ctx; \
539 size_t __event_len, __event_align; \
540 size_t __dynamic_len_idx = 0; \
541 size_t __dynamic_len[ARRAY_SIZE(__event_fields___##_name)]; \
3c4ffab9 542 struct __event_typemap__##_name __typemap; \
e763dbf5
MD
543 int __ret; \
544 \
545 if (0) \
546 (void) __dynamic_len_idx; /* don't warn if unused */ \
52fc2e1f
MD
547 if (!ACCESS_ONCE(__chan->session->active)) \
548 return; \
e763dbf5
MD
549 __event_len = __event_get_size__##_name(__dynamic_len, _args); \
550 __event_align = __event_get_align__##_name(_args); \
551 lib_ring_buffer_ctx_init(&ctx, __chan->chan, NULL, __event_len, \
552 __event_align, -1); \
553 __ret = __chan->ops->event_reserve(&ctx); \
554 if (__ret < 0) \
555 return; \
556 /* Control code (field ordering) */ \
557 _tstruct \
558 __chan->ops->event_commit(&ctx); \
559 return; \
560 /* Copy code, steered by control code */ \
561 _assign \
562}
563
564#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
565
3afe7aac
MD
566/*
567 * Stage 8 of the trace events.
568 *
569 * Register/unregister probes at module load/unload.
570 */
571
572#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */
573
574#define TP_ID1(_token, _system) _token##_system
575#define TP_ID(_token, _system) TP_ID1(_token, _system)
576#define module_init_eval1(_token, _system) module_init(_token##_system)
577#define module_init_eval(_token, _system) module_init_eval1(_token, _system)
578#define module_exit_eval1(_token, _system) module_exit(_token##_system)
579#define module_exit_eval(_token, _system) module_exit_eval1(_token, _system)
580
3afe7aac
MD
581static int TP_ID(__lttng_events_init__, TRACE_SYSTEM)(void)
582{
19c57fbf
MD
583 int ret;
584 int i;
3afe7aac 585
6d2a620c 586 wrapper_vmalloc_sync_all();
3afe7aac
MD
587 ret = TP_ID(__lttng_types_init__, TRACE_SYSTEM)();
588 if (ret)
589 return ret;
19c57fbf
MD
590 for (i = 0; i < ARRAY_SIZE(TP_ID(__event_desc___, TRACE_SYSTEM)); i++) {
591 const struct lttng_event_desc *event_desc;
592
593 event_desc = &TP_ID(__event_desc___, TRACE_SYSTEM)[i];
594 ret = ltt_probe_register(event_desc->name,
595 event_desc->probe_callback);
596 if (ret)
597 goto error;
598 }
599 return 0;
600
601error:
602 for (i--; i >= 0; i--) {
603 const struct lttng_event_desc *event_desc;
604
605 event_desc = &TP_ID(__event_desc___, TRACE_SYSTEM)[i];
606 ltt_probe_unregister(event_desc->name);
607 }
3afe7aac
MD
608 return ret;
609}
610
611module_init_eval(__lttng_events_init__, TRACE_SYSTEM);
612
3afe7aac
MD
613static void TP_ID(__lttng_events_exit__, TRACE_SYSTEM)(void)
614{
19c57fbf
MD
615 int i;
616
617 for (i = 0; i < ARRAY_SIZE(TP_ID(__event_desc___, TRACE_SYSTEM)); i++) {
618 const struct lttng_event_desc *event_desc;
619
620 event_desc = &TP_ID(__event_desc___, TRACE_SYSTEM)[i];
621 ltt_probe_unregister(event_desc->name);
622 }
3afe7aac
MD
623 TP_ID(__lttng_types_exit__, TRACE_SYSTEM)();
624}
625
626module_exit_eval(__lttng_events_exit__, TRACE_SYSTEM);
627
628#undef module_init_eval
629#undef module_exit_eval
630#undef TP_ID1
631#undef TP_ID
This page took 0.049965 seconds and 4 git commands to generate.