relayd: add `lttng_viewer_command_str()`
[lttng-tools.git] / tests / regression / ust / multi-lib / probes.h
1 /*
2 * Copyright (C) 2018 Francis Deslauriers <francis.deslauriers@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
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(
46 ctf_enum(multi, enum_a, int16_t, enum_short_C, 0)
47 ctf_enum(multi, enum_a, int32_t, enum_int_C, 1)
48 ctf_enum(multi, enum_a, uint64_t, enum_long_C, 2)
49 )
50 )
51 #elif defined(ACTIVATE_PROBES_D)
52 TRACEPOINT_ENUM(multi, enum_a,
53 TP_ENUM_VALUES(
54 ctf_enum_value("FIELD_A", 0)
55 ctf_enum_value("FIELD_B", 1)
56 ctf_enum_range("RANGE_C_PRIME", 2, 10)
57 )
58 )
59 TRACEPOINT_EVENT(multi, tp,
60 TP_ARGS(uint64_t, arg),
61 TP_FIELDS(
62 ctf_enum(multi, enum_a, int32_t, enum_int_D, 1)
63 ctf_enum(multi, enum_a, int16_t, enum_short_D, 0)
64 ctf_enum(multi, enum_a, uint64_t, enum_long_D, 2)
65 )
66 )
67 #elif defined(ACTIVATE_PROBES_E)
68 /*
69 * Here we declare tracepoints really similar to one another but are different.
70 * This is meant to test tracepoint comparaison code.
71 */
72 TRACEPOINT_EVENT(multi, tp,
73 TP_ARGS(uint64_t, arg),
74 TP_FIELDS(
75 ctf_integer(uint64_t, arg_long, arg)
76 )
77 )
78 #elif defined(ACTIVATE_PROBES_F)
79 TRACEPOINT_EVENT(multi, tp,
80 TP_ARGS(uint64_t, arg),
81 TP_FIELDS(
82 ctf_integer(int64_t, arg_long, arg)
83 )
84 )
85 #elif defined(ACTIVATE_PROBES_G)
86 TRACEPOINT_EVENT(multi, tp,
87 TP_ARGS(uint64_t, arg),
88 TP_FIELDS(
89 ctf_integer_hex(int64_t, arg_long, arg)
90 )
91 )
92 #elif defined(ACTIVATE_PROBES_H)
93 TRACEPOINT_EVENT(multi, tp,
94 TP_ARGS(uint64_t, arg),
95 TP_FIELDS(
96 ctf_integer_hex(int16_t, arg_long, arg)
97 )
98 )
99 #elif defined(ACTIVATE_PROBES_I)
100 TRACEPOINT_EVENT(multi, tp,
101 TP_ARGS(uint64_t, arg),
102 TP_FIELDS(
103 ctf_integer_hex(int32_t, arg_long, arg)
104 )
105 )
106 #elif defined(ACTIVATE_PROBES_J)
107 TRACEPOINT_EVENT(multi, tp,
108 TP_ARGS(uint64_t, arg),
109 TP_FIELDS(
110 ctf_float(float, arg_float, (float) arg)
111 )
112 )
113 #elif defined(ACTIVATE_PROBES_K)
114 TRACEPOINT_EVENT(multi, tp,
115 TP_ARGS(uint64_t, arg),
116 TP_FIELDS(
117 ctf_float(double, arg_float, (double) arg)
118 )
119 )
120 #elif defined(ACTIVATE_PROBES_L)
121 TRACEPOINT_ENUM(multi, enum_a,
122 TP_ENUM_VALUES(
123 ctf_enum_value("FIELD_A", 0)
124 ctf_enum_value("FIELD_B", 1)
125 ctf_enum_range("RANGE_C", 2, 10)
126 )
127 )
128 TRACEPOINT_EVENT(multi, tp,
129 TP_ARGS(uint64_t, arg),
130 TP_FIELDS(
131 ctf_enum(multi, enum_a, int32_t, enum_int, 1)
132 )
133 )
134 #elif defined(ACTIVATE_PROBES_M)
135 TRACEPOINT_ENUM(multi, enum_a,
136 TP_ENUM_VALUES(
137 ctf_enum_value("FIELD_A", 0)
138 ctf_enum_value("FIELD_B", 1)
139 ctf_enum_range("RANGE_C", 2, 10)
140 )
141 )
142 TRACEPOINT_EVENT(multi, tp,
143 TP_ARGS(uint64_t, arg),
144 TP_FIELDS(
145 ctf_enum(multi, enum_a, int64_t, enum_int, 1)
146 )
147 )
148 #elif defined(ACTIVATE_PROBES_N)
149 TRACEPOINT_ENUM(multi, enum_a,
150 TP_ENUM_VALUES(
151 ctf_enum_value("FIELD_A", 0)
152 ctf_enum_value("FIELD_B", 1)
153 ctf_enum_range("RANGE_C", 2, 10)
154 )
155 )
156 TRACEPOINT_EVENT(multi, tp,
157 TP_ARGS(uint64_t, arg),
158 TP_FIELDS(
159 ctf_enum(multi, enum_a, int16_t, enum_int, 1)
160 )
161 )
162 #elif defined(ACTIVATE_PROBES_O)
163 TRACEPOINT_EVENT(multi, tp,
164 TP_ARGS(uint64_t, arg),
165 TP_FIELDS(
166 ctf_string(arg_string, "string")
167 )
168 )
169 #elif defined(ACTIVATE_PROBES_P)
170 TRACEPOINT_EVENT(multi, tp,
171 TP_ARGS(uint64_t, arg),
172 TP_FIELDS(
173 ctf_string(my_arg_string, "string")
174 )
175 )
176 #else
177 TRACEPOINT_EVENT(multi, tp,
178 TP_ARGS(uint64_t, arg),
179 TP_FIELDS(
180 )
181 )
182 #endif
183
184 #endif /* PROBES_H */
185
186 #include <lttng/tracepoint-event.h>
This page took 0.061691 seconds and 4 git commands to generate.