Commit | Line | Data |
---|---|---|
9d16b343 MJ |
1 | /* |
2 | * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
3 | * | |
4 | * SPDX-License-Identifier: MIT | |
5 | * | |
6 | */ | |
7 | ||
7e0cc23b CB |
8 | #undef TRACEPOINT_PROVIDER |
9 | #define TRACEPOINT_PROVIDER tp | |
10 | ||
11 | #if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ) | |
12 | #define _TRACEPOINT_TP_H | |
13 | ||
7e0cc23b | 14 | #include <lttng/tracepoint.h> |
6f9f5cd0 JR |
15 | #include <stdint.h> |
16 | ||
17 | TRACEPOINT_ENUM( | |
18 | tp, tptest_enum, | |
19 | TP_ENUM_VALUES( | |
20 | ctf_enum_auto("AUTO: EXPECT 0") | |
21 | ctf_enum_value("VALUE: 23", 23) | |
22 | ctf_enum_value("VALUE: 27", 27) | |
23 | ctf_enum_auto("AUTO: EXPECT 28") | |
24 | ctf_enum_range("RANGE: 101 TO 303", 101, 303) | |
25 | ctf_enum_auto("AUTO: EXPECT 304") | |
26 | ctf_enum_value("VALUE: -1", -1) | |
27 | ) | |
28 | ) | |
7e0cc23b CB |
29 | |
30 | TRACEPOINT_EVENT(tp, tptest, | |
31 | TP_ARGS(int, anint, int, netint, long *, values, | |
32 | char *, text, size_t, textlen, | |
6f9f5cd0 | 33 | char *, etext, uint32_t * , net_values, |
7e0cc23b CB |
34 | double, doublearg, float, floatarg), |
35 | TP_FIELDS( | |
36 | ctf_integer(int, intfield, anint) | |
37 | ctf_integer_hex(int, intfield2, anint) | |
38 | ctf_integer(long, longfield, anint) | |
6f9f5cd0 | 39 | ctf_integer(int, signedfield, -1) |
7e0cc23b CB |
40 | ctf_integer_network(int, netintfield, netint) |
41 | ctf_integer_network_hex(int, netintfieldhex, netint) | |
42 | ctf_array(long, arrfield1, values, 3) | |
43 | ctf_array_text(char, arrfield2, text, 10) | |
6f9f5cd0 | 44 | ctf_array_network(uint32_t, arrfield3, net_values, 3) |
7e0cc23b CB |
45 | ctf_sequence(char, seqfield1, text, size_t, textlen) |
46 | ctf_sequence_text(char, seqfield2, text, size_t, textlen) | |
6f9f5cd0 JR |
47 | ctf_sequence_network(uint32_t, seqfield3, net_values, size_t, 3) |
48 | ctf_sequence(long, seqfield4, values, size_t, 3) | |
7e0cc23b | 49 | ctf_string(stringfield, text) |
6f9f5cd0 | 50 | ctf_string(stringfield2, etext) |
7e0cc23b CB |
51 | ctf_float(float, floatfield, floatarg) |
52 | ctf_float(double, doublefield, doublearg) | |
6f9f5cd0 JR |
53 | ctf_enum(tp, tptest_enum, int, enum0, 0) |
54 | ctf_enum(tp, tptest_enum, int, enum23, 23) | |
55 | ctf_enum(tp, tptest_enum, int, enum27, 27) | |
56 | ctf_enum(tp, tptest_enum, int, enum28, 28) | |
57 | ctf_enum(tp, tptest_enum, int, enum202, 202) | |
58 | ctf_enum(tp, tptest_enum, int, enum304, 304) | |
59 | ctf_enum(tp, tptest_enum, int, enumnegative, -1) | |
7e0cc23b CB |
60 | ) |
61 | ) | |
62 | ||
6ffce1f5 JR |
63 | TRACEPOINT_EVENT(tp, end, |
64 | TP_ARGS(), | |
65 | TP_FIELDS( | |
66 | ) | |
67 | ) | |
68 | ||
7e0cc23b CB |
69 | #endif /* _TRACEPOINT_TP_H */ |
70 | ||
59eb182b MD |
71 | #undef TRACEPOINT_INCLUDE |
72 | #define TRACEPOINT_INCLUDE "./tp.h" | |
7e0cc23b CB |
73 | |
74 | /* This part must be outside ifdef protection */ | |
75 | #include <lttng/tracepoint-event.h> |