testapp: gen-ust-events: augment captured fields
[lttng-tools.git] / tests / utils / testapp / gen-ust-events / tp.h
1 /*
2 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
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
14 #include <lttng/tracepoint.h>
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 )
29
30 TRACEPOINT_EVENT(tp, tptest,
31 TP_ARGS(int, anint, int, netint, long *, values,
32 char *, text, size_t, textlen,
33 char *, etext, uint32_t * , net_values,
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)
39 ctf_integer(int, signedfield, -1)
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)
44 ctf_array_network(uint32_t, arrfield3, net_values, 3)
45 ctf_sequence(char, seqfield1, text, size_t, textlen)
46 ctf_sequence_text(char, seqfield2, text, size_t, textlen)
47 ctf_sequence_network(uint32_t, seqfield3, net_values, size_t, 3)
48 ctf_sequence(long, seqfield4, values, size_t, 3)
49 ctf_string(stringfield, text)
50 ctf_string(stringfield2, etext)
51 ctf_float(float, floatfield, floatarg)
52 ctf_float(double, doublefield, doublearg)
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)
60 )
61 )
62
63 #endif /* _TRACEPOINT_TP_H */
64
65 #undef TRACEPOINT_INCLUDE_FILE
66 #define TRACEPOINT_INCLUDE_FILE ./tp.h
67
68 /* This part must be outside ifdef protection */
69 #include <lttng/tracepoint-event.h>
This page took 0.043416 seconds and 4 git commands to generate.