Commit | Line | Data |
---|---|---|
3f7f208a | 1 | /* |
9d16b343 | 2 | * Copyright (C) 2018 Francis Deslauriers <francis.deslauriers@efficios.com> |
3f7f208a | 3 | * |
9d16b343 | 4 | * SPDX-License-Identifier: LGPL-2.1-only |
3f7f208a | 5 | * |
3f7f208a FD |
6 | */ |
7 | ||
8 | #undef TRACEPOINT_PROVIDER | |
9 | #define TRACEPOINT_PROVIDER multi | |
10 | ||
11 | #undef TRACEPOINT_INCLUDE | |
12 | #define TRACEPOINT_INCLUDE "./probes.h" | |
13 | ||
14 | #if !defined(PROBES_H) || defined(TRACEPOINT_HEADER_MULTI_READ) | |
15 | #define PROBES_H | |
16 | ||
17 | #include <lttng/tracepoint.h> | |
18 | #include <stdint.h> | |
19 | ||
20 | #if defined(ACTIVATE_PROBES_A) | |
21 | TRACEPOINT_EVENT(multi, tp, | |
22 | TP_ARGS(uint64_t, arg), | |
23 | TP_FIELDS( | |
24 | ctf_integer(uint64_t, arg_long_A, arg) | |
25 | ) | |
26 | ) | |
27 | #elif defined(ACTIVATE_PROBES_B) | |
28 | TRACEPOINT_EVENT(multi, tp, | |
29 | TP_ARGS(uint64_t, arg), | |
30 | TP_FIELDS( | |
31 | ctf_integer(uint64_t, arg_long_B, arg) | |
32 | ctf_float(float, arg_float_B, (float) arg) | |
33 | ) | |
34 | ) | |
35 | #elif defined(ACTIVATE_PROBES_C) | |
36 | TRACEPOINT_ENUM(multi, enum_a, | |
37 | TP_ENUM_VALUES( | |
38 | ctf_enum_value("FIELD_A", 0) | |
39 | ctf_enum_value("FIELD_B", 1) | |
40 | ctf_enum_range("RANGE_C", 2, 10) | |
41 | ) | |
42 | ) | |
43 | TRACEPOINT_EVENT(multi, tp, | |
44 | TP_ARGS(uint64_t, arg), | |
45 | TP_FIELDS( | |
f46376a1 | 46 | ctf_unused(arg) |
3f7f208a FD |
47 | ctf_enum(multi, enum_a, int16_t, enum_short_C, 0) |
48 | ctf_enum(multi, enum_a, int32_t, enum_int_C, 1) | |
49 | ctf_enum(multi, enum_a, uint64_t, enum_long_C, 2) | |
50 | ) | |
51 | ) | |
52 | #elif defined(ACTIVATE_PROBES_D) | |
53 | TRACEPOINT_ENUM(multi, enum_a, | |
54 | TP_ENUM_VALUES( | |
55 | ctf_enum_value("FIELD_A", 0) | |
56 | ctf_enum_value("FIELD_B", 1) | |
57 | ctf_enum_range("RANGE_C_PRIME", 2, 10) | |
58 | ) | |
59 | ) | |
60 | TRACEPOINT_EVENT(multi, tp, | |
61 | TP_ARGS(uint64_t, arg), | |
62 | TP_FIELDS( | |
f46376a1 MJ |
63 | ctf_unused(arg) |
64 | ctf_enum(multi, enum_a, int32_t, enum_int_D, 1) | |
3f7f208a FD |
65 | ctf_enum(multi, enum_a, int16_t, enum_short_D, 0) |
66 | ctf_enum(multi, enum_a, uint64_t, enum_long_D, 2) | |
67 | ) | |
68 | ) | |
69 | #elif defined(ACTIVATE_PROBES_E) | |
70 | /* | |
71 | * Here we declare tracepoints really similar to one another but are different. | |
72 | * This is meant to test tracepoint comparaison code. | |
73 | */ | |
74 | TRACEPOINT_EVENT(multi, tp, | |
75 | TP_ARGS(uint64_t, arg), | |
76 | TP_FIELDS( | |
77 | ctf_integer(uint64_t, arg_long, arg) | |
78 | ) | |
79 | ) | |
80 | #elif defined(ACTIVATE_PROBES_F) | |
81 | TRACEPOINT_EVENT(multi, tp, | |
82 | TP_ARGS(uint64_t, arg), | |
83 | TP_FIELDS( | |
84 | ctf_integer(int64_t, arg_long, arg) | |
85 | ) | |
86 | ) | |
87 | #elif defined(ACTIVATE_PROBES_G) | |
88 | TRACEPOINT_EVENT(multi, tp, | |
89 | TP_ARGS(uint64_t, arg), | |
90 | TP_FIELDS( | |
91 | ctf_integer_hex(int64_t, arg_long, arg) | |
92 | ) | |
93 | ) | |
94 | #elif defined(ACTIVATE_PROBES_H) | |
95 | TRACEPOINT_EVENT(multi, tp, | |
96 | TP_ARGS(uint64_t, arg), | |
97 | TP_FIELDS( | |
98 | ctf_integer_hex(int16_t, arg_long, arg) | |
99 | ) | |
100 | ) | |
101 | #elif defined(ACTIVATE_PROBES_I) | |
102 | TRACEPOINT_EVENT(multi, tp, | |
103 | TP_ARGS(uint64_t, arg), | |
104 | TP_FIELDS( | |
105 | ctf_integer_hex(int32_t, arg_long, arg) | |
106 | ) | |
107 | ) | |
108 | #elif defined(ACTIVATE_PROBES_J) | |
109 | TRACEPOINT_EVENT(multi, tp, | |
110 | TP_ARGS(uint64_t, arg), | |
111 | TP_FIELDS( | |
112 | ctf_float(float, arg_float, (float) arg) | |
113 | ) | |
114 | ) | |
115 | #elif defined(ACTIVATE_PROBES_K) | |
116 | TRACEPOINT_EVENT(multi, tp, | |
117 | TP_ARGS(uint64_t, arg), | |
118 | TP_FIELDS( | |
119 | ctf_float(double, arg_float, (double) arg) | |
120 | ) | |
121 | ) | |
122 | #elif defined(ACTIVATE_PROBES_L) | |
123 | TRACEPOINT_ENUM(multi, enum_a, | |
124 | TP_ENUM_VALUES( | |
125 | ctf_enum_value("FIELD_A", 0) | |
126 | ctf_enum_value("FIELD_B", 1) | |
127 | ctf_enum_range("RANGE_C", 2, 10) | |
128 | ) | |
129 | ) | |
130 | TRACEPOINT_EVENT(multi, tp, | |
131 | TP_ARGS(uint64_t, arg), | |
132 | TP_FIELDS( | |
f46376a1 | 133 | ctf_unused(arg) |
3f7f208a FD |
134 | ctf_enum(multi, enum_a, int32_t, enum_int, 1) |
135 | ) | |
136 | ) | |
137 | #elif defined(ACTIVATE_PROBES_M) | |
138 | TRACEPOINT_ENUM(multi, enum_a, | |
139 | TP_ENUM_VALUES( | |
140 | ctf_enum_value("FIELD_A", 0) | |
141 | ctf_enum_value("FIELD_B", 1) | |
142 | ctf_enum_range("RANGE_C", 2, 10) | |
143 | ) | |
144 | ) | |
145 | TRACEPOINT_EVENT(multi, tp, | |
146 | TP_ARGS(uint64_t, arg), | |
147 | TP_FIELDS( | |
f46376a1 MJ |
148 | ctf_unused(arg) |
149 | ctf_enum(multi, enum_a, int64_t, enum_int, 1) | |
3f7f208a FD |
150 | ) |
151 | ) | |
152 | #elif defined(ACTIVATE_PROBES_N) | |
153 | TRACEPOINT_ENUM(multi, enum_a, | |
154 | TP_ENUM_VALUES( | |
155 | ctf_enum_value("FIELD_A", 0) | |
156 | ctf_enum_value("FIELD_B", 1) | |
157 | ctf_enum_range("RANGE_C", 2, 10) | |
158 | ) | |
159 | ) | |
160 | TRACEPOINT_EVENT(multi, tp, | |
161 | TP_ARGS(uint64_t, arg), | |
162 | TP_FIELDS( | |
f46376a1 | 163 | ctf_unused(arg) |
3f7f208a FD |
164 | ctf_enum(multi, enum_a, int16_t, enum_int, 1) |
165 | ) | |
166 | ) | |
167 | #elif defined(ACTIVATE_PROBES_O) | |
168 | TRACEPOINT_EVENT(multi, tp, | |
169 | TP_ARGS(uint64_t, arg), | |
170 | TP_FIELDS( | |
f46376a1 | 171 | ctf_unused(arg) |
3f7f208a FD |
172 | ctf_string(arg_string, "string") |
173 | ) | |
174 | ) | |
175 | #elif defined(ACTIVATE_PROBES_P) | |
176 | TRACEPOINT_EVENT(multi, tp, | |
177 | TP_ARGS(uint64_t, arg), | |
178 | TP_FIELDS( | |
f46376a1 | 179 | ctf_unused(arg) |
3f7f208a FD |
180 | ctf_string(my_arg_string, "string") |
181 | ) | |
182 | ) | |
183 | #else | |
184 | TRACEPOINT_EVENT(multi, tp, | |
185 | TP_ARGS(uint64_t, arg), | |
186 | TP_FIELDS( | |
f46376a1 | 187 | ctf_unused(arg) |
3f7f208a FD |
188 | ) |
189 | ) | |
190 | #endif | |
191 | ||
192 | #endif /* PROBES_H */ | |
193 | ||
194 | #include <lttng/tracepoint-event.h> |