Clean-up: run format-cpp on the tree
[lttng-tools.git] / tests / regression / ust / type-declarations / ust_tests_td.h
1 /*
2 * Copyright (C) 2014 Geneviève Bastien <gbastien@versatic.net>
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #undef TRACEPOINT_PROVIDER
9 #define TRACEPOINT_PROVIDER ust_tests_td
10
11 #if !defined(_TRACEPOINT_UST_TESTS_TD_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
12 #define _TRACEPOINT_UST_TESTS_TD_H
13
14 #include <lttng/tracepoint.h>
15
16 TRACEPOINT_ENUM(ust_tests_td,
17 testenum,
18 TP_ENUM_VALUES(ctf_enum_value("zero", 0) ctf_enum_value("one", 1)))
19
20 TRACEPOINT_ENUM(ust_tests_td,
21 testenum2,
22 TP_ENUM_VALUES(ctf_enum_value("zero", 0) ctf_enum_value("five", 5)
23 ctf_enum_range("ten_to_twenty", 10, 20)))
24
25 TRACEPOINT_ENUM(ust_tests_td,
26 testenum3,
27 TP_ENUM_VALUES(ctf_enum_auto("zero") ctf_enum_value("two", 2) ctf_enum_auto("three")
28 ctf_enum_range("ten_to_twenty", 10, 20)
29 ctf_enum_auto("twenty_one")))
30
31 /*
32 * Enumeration field is used twice to make sure the global type declaration
33 * is entered only once in the metadata file.
34 */
35 TRACEPOINT_EVENT(
36 ust_tests_td,
37 tptest,
38 TP_ARGS(int, enumval, int, enumval2, int, enumval3),
39 TP_FIELDS(
40 ctf_enum(ust_tests_td, testenum, int, enumfield, enumval) ctf_enum(
41 ust_tests_td, testenum, long long, enumfield_bis, enumval2)
42 ctf_enum(ust_tests_td, testenum2, unsigned int, enumfield_third, enumval3)))
43
44 /*
45 * Another tracepoint using the global types to make sure each global type is
46 * entered only once in the metadata file.
47 */
48 TRACEPOINT_EVENT(ust_tests_td,
49 tptest_bis,
50 TP_ARGS(int, enumval),
51 TP_FIELDS(ctf_enum(ust_tests_td, testenum, unsigned char, enumfield, enumval)))
52
53 /*
54 * Test autoincrementing enumeration values.
55 */
56 TRACEPOINT_EVENT(ust_tests_td,
57 test_auto,
58 TP_ARGS(void),
59 TP_FIELDS(ctf_enum(ust_tests_td, testenum3, int, zero, 0) ctf_enum(
60 ust_tests_td, testenum3, int, two, 2)
61 ctf_enum(ust_tests_td, testenum3, int, three, 3) ctf_enum(
62 ust_tests_td, testenum3, int, fifteen, 15)
63 ctf_enum(ust_tests_td, testenum3, int, twenty_one, 21)))
64
65 #endif /* _TRACEPOINT_UST_TESTS_TD_H */
66
67 #undef TRACEPOINT_INCLUDE
68 #define TRACEPOINT_INCLUDE "./ust_tests_td.h"
69
70 /* This part must be outside ifdef protection */
71 #include <lttng/tracepoint-event.h>
This page took 0.030798 seconds and 4 git commands to generate.