bytecode: rename `lttng_filter_sync_state()` -> `lttng_bytecode_filter_sync_state()`
[lttng-modules.git] / include / lttng / define_trace.h
1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2 *
3 * lttng/define_trace.h
4 *
5 * Copyright (C) 2009 Steven Rostedt <rostedt@goodmis.org>
6 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 */
8
9 /*
10 * Trace files that want to automate creationg of all tracepoints defined
11 * in their file should include this file. The following are macros that the
12 * trace file may define:
13 *
14 * TRACE_SYSTEM defines the system the tracepoint is for
15 *
16 * TRACE_INCLUDE_FILE if the file name is something other than TRACE_SYSTEM.h
17 * This macro may be defined to tell define_trace.h what file to include.
18 * Note, leave off the ".h".
19 *
20 * TRACE_INCLUDE_PATH if the path is something other than core kernel include/trace
21 * then this macro can define the path to use. Note, the path is relative to
22 * define_trace.h, not the file including it. Full path names for out of tree
23 * modules must be used.
24 */
25
26 #ifdef CREATE_TRACE_POINTS
27
28 /* Prevent recursion */
29 #undef CREATE_TRACE_POINTS
30
31 #include <linux/stringify.h>
32
33 #undef LTTNG_TRACEPOINT_EVENT_MAP
34 #define LTTNG_TRACEPOINT_EVENT_MAP(name, map, proto, args, fields)
35
36 #undef LTTNG_TRACEPOINT_EVENT_MAP_NOARGS
37 #define LTTNG_TRACEPOINT_EVENT_MAP_NOARGS(name, map, fields)
38
39 #undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP
40 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(template, name, map, proto, args)
41
42 #undef LTTNG_TRACEPOINT_EVENT
43 #define LTTNG_TRACEPOINT_EVENT(name, proto, args, fields)
44
45 #undef LTTNG_TRACEPOINT_EVENT_CODE
46 #define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code_pre, fields, _code_post)
47
48 #undef LTTNG_TRACEPOINT_EVENT_CODE_MAP
49 #define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code_pre, fields, _code_post)
50
51 #undef LTTNG_TRACEPOINT_EVENT_INSTANCE
52 #define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args)
53
54 #undef LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS
55 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name)
56
57 #undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS
58 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(template, name, map)
59
60 #undef TRACE_INCLUDE
61 #undef __TRACE_INCLUDE
62
63 #ifndef TRACE_INCLUDE_FILE
64 # define TRACE_INCLUDE_FILE TRACE_SYSTEM
65 # define UNDEF_TRACE_INCLUDE_FILE
66 #endif
67
68 #ifndef TRACE_INCLUDE_PATH
69 # define __TRACE_INCLUDE(system) <trace/events/system.h>
70 # define UNDEF_TRACE_INCLUDE_PATH
71 #else
72 # define __TRACE_INCLUDE(system) __stringify(TRACE_INCLUDE_PATH/system.h)
73 #endif
74
75 # define TRACE_INCLUDE(system) __TRACE_INCLUDE(system)
76
77 /* Let the trace headers be reread */
78 #define TRACE_HEADER_MULTI_READ
79
80 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
81
82 /* Make all open coded DECLARE_TRACE nops */
83 #undef DECLARE_TRACE
84 #define DECLARE_TRACE(name, proto, args)
85
86 #ifdef LTTNG_PACKAGE_BUILD
87 #include <lttng/tracepoint-event-impl.h>
88 #endif
89
90 #undef LTTNG_TRACEPOINT_EVENT
91 #undef LTTNG_TRACEPOINT_EVENT_INSTANCE
92 #undef LTTNG_TRACEPOINT_EVENT_MAP
93 #undef LTTNG_TRACEPOINT_EVENT_CLASS
94 #undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP
95 #undef LTTNG_TRACEPOINT_EVENT_CODE_MAP
96 #undef LTTNG_TRACEPOINT_EVENT_CODE
97 #undef LTTNG_TRACEPOINT_EVENT_MAP_NOARGS
98 #undef LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS
99 #undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS
100 #undef TRACE_HEADER_MULTI_READ
101
102 /* Only undef what we defined in this file */
103 #ifdef UNDEF_TRACE_INCLUDE_FILE
104 # undef TRACE_INCLUDE_FILE
105 # undef UNDEF_TRACE_INCLUDE_FILE
106 #endif
107
108 #ifdef UNDEF_TRACE_INCLUDE_PATH
109 # undef TRACE_INCLUDE_PATH
110 # undef UNDEF_TRACE_INCLUDE_PATH
111 #endif
112
113 /*
114 * We want to re-include lttng-tracepoint-event.h for a following probe.
115 */
116 #undef LTTNG_TRACEPOINT_EVENT_H
117
118 /* We may be processing more files */
119 #define CREATE_TRACE_POINTS
120
121 #endif /* CREATE_TRACE_POINTS */
This page took 0.031739 seconds and 4 git commands to generate.