Tests: add duplicated providers tests
[lttng-tools.git] / tests / regression / ust / multi-lib / probes.h
1 /*
2 * Copyright (C) - 2018 Francis Deslauriers <francis.deslauriers@efficios.com>
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by the
6 * Free Software Foundation; version 2.1 of the License.
7 *
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17
18 #undef TRACEPOINT_PROVIDER
19 #define TRACEPOINT_PROVIDER multi
20
21 #undef TRACEPOINT_INCLUDE
22 #define TRACEPOINT_INCLUDE "./probes.h"
23
24 #if !defined(PROBES_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
25 #define PROBES_H
26
27 #include <lttng/tracepoint.h>
28 #include <stdint.h>
29
30 #if defined(ACTIVATE_PROBES_A)
31 TRACEPOINT_EVENT(multi, tp,
32 TP_ARGS(uint64_t, arg),
33 TP_FIELDS(
34 ctf_integer(uint64_t, arg_long_A, arg)
35 )
36 )
37 #elif defined(ACTIVATE_PROBES_B)
38 TRACEPOINT_EVENT(multi, tp,
39 TP_ARGS(uint64_t, arg),
40 TP_FIELDS(
41 ctf_integer(uint64_t, arg_long_B, arg)
42 ctf_float(float, arg_float_B, (float) arg)
43 )
44 )
45 #elif defined(ACTIVATE_PROBES_C)
46 TRACEPOINT_ENUM(multi, enum_a,
47 TP_ENUM_VALUES(
48 ctf_enum_value("FIELD_A", 0)
49 ctf_enum_value("FIELD_B", 1)
50 ctf_enum_range("RANGE_C", 2, 10)
51 )
52 )
53 TRACEPOINT_EVENT(multi, tp,
54 TP_ARGS(uint64_t, arg),
55 TP_FIELDS(
56 ctf_enum(multi, enum_a, int16_t, enum_short_C, 0)
57 ctf_enum(multi, enum_a, int32_t, enum_int_C, 1)
58 ctf_enum(multi, enum_a, uint64_t, enum_long_C, 2)
59 )
60 )
61 #elif defined(ACTIVATE_PROBES_D)
62 TRACEPOINT_ENUM(multi, enum_a,
63 TP_ENUM_VALUES(
64 ctf_enum_value("FIELD_A", 0)
65 ctf_enum_value("FIELD_B", 1)
66 ctf_enum_range("RANGE_C_PRIME", 2, 10)
67 )
68 )
69 TRACEPOINT_EVENT(multi, tp,
70 TP_ARGS(uint64_t, arg),
71 TP_FIELDS(
72 ctf_enum(multi, enum_a, int32_t, enum_int_D, 1)
73 ctf_enum(multi, enum_a, int16_t, enum_short_D, 0)
74 ctf_enum(multi, enum_a, uint64_t, enum_long_D, 2)
75 )
76 )
77 #elif defined(ACTIVATE_PROBES_E)
78 /*
79 * Here we declare tracepoints really similar to one another but are different.
80 * This is meant to test tracepoint comparaison code.
81 */
82 TRACEPOINT_EVENT(multi, tp,
83 TP_ARGS(uint64_t, arg),
84 TP_FIELDS(
85 ctf_integer(uint64_t, arg_long, arg)
86 )
87 )
88 #elif defined(ACTIVATE_PROBES_F)
89 TRACEPOINT_EVENT(multi, tp,
90 TP_ARGS(uint64_t, arg),
91 TP_FIELDS(
92 ctf_integer(int64_t, arg_long, arg)
93 )
94 )
95 #elif defined(ACTIVATE_PROBES_G)
96 TRACEPOINT_EVENT(multi, tp,
97 TP_ARGS(uint64_t, arg),
98 TP_FIELDS(
99 ctf_integer_hex(int64_t, arg_long, arg)
100 )
101 )
102 #elif defined(ACTIVATE_PROBES_H)
103 TRACEPOINT_EVENT(multi, tp,
104 TP_ARGS(uint64_t, arg),
105 TP_FIELDS(
106 ctf_integer_hex(int16_t, arg_long, arg)
107 )
108 )
109 #elif defined(ACTIVATE_PROBES_I)
110 TRACEPOINT_EVENT(multi, tp,
111 TP_ARGS(uint64_t, arg),
112 TP_FIELDS(
113 ctf_integer_hex(int32_t, arg_long, arg)
114 )
115 )
116 #elif defined(ACTIVATE_PROBES_J)
117 TRACEPOINT_EVENT(multi, tp,
118 TP_ARGS(uint64_t, arg),
119 TP_FIELDS(
120 ctf_float(float, arg_float, (float) arg)
121 )
122 )
123 #elif defined(ACTIVATE_PROBES_K)
124 TRACEPOINT_EVENT(multi, tp,
125 TP_ARGS(uint64_t, arg),
126 TP_FIELDS(
127 ctf_float(double, arg_float, (double) arg)
128 )
129 )
130 #elif defined(ACTIVATE_PROBES_L)
131 TRACEPOINT_ENUM(multi, enum_a,
132 TP_ENUM_VALUES(
133 ctf_enum_value("FIELD_A", 0)
134 ctf_enum_value("FIELD_B", 1)
135 ctf_enum_range("RANGE_C", 2, 10)
136 )
137 )
138 TRACEPOINT_EVENT(multi, tp,
139 TP_ARGS(uint64_t, arg),
140 TP_FIELDS(
141 ctf_enum(multi, enum_a, int32_t, enum_int, 1)
142 )
143 )
144 #elif defined(ACTIVATE_PROBES_M)
145 TRACEPOINT_ENUM(multi, enum_a,
146 TP_ENUM_VALUES(
147 ctf_enum_value("FIELD_A", 0)
148 ctf_enum_value("FIELD_B", 1)
149 ctf_enum_range("RANGE_C", 2, 10)
150 )
151 )
152 TRACEPOINT_EVENT(multi, tp,
153 TP_ARGS(uint64_t, arg),
154 TP_FIELDS(
155 ctf_enum(multi, enum_a, int64_t, enum_int, 1)
156 )
157 )
158 #elif defined(ACTIVATE_PROBES_N)
159 TRACEPOINT_ENUM(multi, enum_a,
160 TP_ENUM_VALUES(
161 ctf_enum_value("FIELD_A", 0)
162 ctf_enum_value("FIELD_B", 1)
163 ctf_enum_range("RANGE_C", 2, 10)
164 )
165 )
166 TRACEPOINT_EVENT(multi, tp,
167 TP_ARGS(uint64_t, arg),
168 TP_FIELDS(
169 ctf_enum(multi, enum_a, int16_t, enum_int, 1)
170 )
171 )
172 #elif defined(ACTIVATE_PROBES_O)
173 TRACEPOINT_EVENT(multi, tp,
174 TP_ARGS(uint64_t, arg),
175 TP_FIELDS(
176 ctf_string(arg_string, "string")
177 )
178 )
179 #elif defined(ACTIVATE_PROBES_P)
180 TRACEPOINT_EVENT(multi, tp,
181 TP_ARGS(uint64_t, arg),
182 TP_FIELDS(
183 ctf_string(my_arg_string, "string")
184 )
185 )
186 #else
187 TRACEPOINT_EVENT(multi, tp,
188 TP_ARGS(uint64_t, arg),
189 TP_FIELDS(
190 )
191 )
192 #endif
193
194 #endif /* PROBES_H */
195
196 #include <lttng/tracepoint-event.h>
This page took 0.034232 seconds and 5 git commands to generate.