Namespace kernel version macros
[lttng-modules.git] / include / instrumentation / events / lttng-test.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM lttng_test
4
5 #if !defined(LTTNG_TRACE_LTTNG_TEST_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_LTTNG_TEST_H
7
8 #include <lttng/tracepoint-event.h>
9 #include <linux/types.h>
10 #include <lttng/kernel-version.h>
11
12 LTTNG_TRACEPOINT_ENUM(
13 lttng_test_filter_event_enum,
14 TP_ENUM_VALUES(
15 ctf_enum_auto("AUTO: EXPECT 0")
16 ctf_enum_value("VALUE: 23", 23)
17 ctf_enum_value("VALUE: 27", 27)
18 ctf_enum_auto("AUTO: EXPECT 28")
19 ctf_enum_range("RANGE: 101 TO 303", 101, 303)
20 ctf_enum_auto("AUTO: EXPECT 304")
21 ctf_enum_value("VALUE: -1", -1)
22 )
23 )
24
25 LTTNG_TRACEPOINT_EVENT(lttng_test_filter_event,
26 TP_PROTO(int anint, int netint, long *values,
27 char *text, size_t textlen,
28 char *etext, uint32_t * net_values),
29 TP_ARGS(anint, netint, values, text, textlen, etext, net_values),
30 TP_FIELDS(
31 ctf_integer(int, intfield, anint)
32 ctf_integer_hex(int, intfield2, anint)
33 ctf_integer(long, longfield, anint)
34 ctf_integer(int, signedfield, -1)
35 ctf_integer_network(int, netintfield, netint)
36 ctf_integer_network_hex(int, netintfieldhex, netint)
37 ctf_array(long, arrfield1, values, 3)
38 ctf_array_text(char, arrfield2, text, 10)
39 ctf_array_network(uint32_t, arrfield3, net_values, 3)
40 ctf_sequence(char, seqfield1, text, size_t, textlen)
41 ctf_sequence_text(char, seqfield2, text, size_t, textlen)
42 ctf_sequence_network(uint32_t, seqfield3, net_values, size_t, 3)
43 ctf_sequence(long, seqfield4, values, size_t, 3)
44 ctf_string(stringfield, text)
45 ctf_string(stringfield2, etext)
46 ctf_sequence_bitfield(long, bitfield_seq, values, uint8_t, 3)
47 ctf_array_bitfield(long, bitfield_array, values, 3)
48 ctf_enum(lttng_test_filter_event_enum, int, enum0, 0)
49 ctf_enum(lttng_test_filter_event_enum, int, enum23, 23)
50 ctf_enum(lttng_test_filter_event_enum, int, enum27, 27)
51 ctf_enum(lttng_test_filter_event_enum, int, enum28, 28)
52 ctf_enum(lttng_test_filter_event_enum, int, enum202, 202)
53 ctf_enum(lttng_test_filter_event_enum, int, enum304, 304)
54 ctf_enum(lttng_test_filter_event_enum, int, enumnegative, -1)
55 )
56 )
57
58 #endif /* LTTNG_TRACE_LTTNG_TEST_H */
59
60 /* This part must be outside protection */
61 #include <lttng/define_trace.h>
This page took 0.030279 seconds and 4 git commands to generate.