Clean-up: run format-cpp on the tree
[lttng-tools.git] / tests / regression / ust / type-declarations / ust_tests_td.h
CommitLineData
10b56aef
MD
1/*
2 * Copyright (C) 2014 Geneviève Bastien <gbastien@versatic.net>
3 *
9d16b343 4 * SPDX-License-Identifier: MIT
10b56aef 5 *
10b56aef
MD
6 */
7
9d16b343
MJ
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
10b56aef
MD
14#include <lttng/tracepoint.h>
15
28f23191
JG
16TRACEPOINT_ENUM(ust_tests_td,
17 testenum,
18 TP_ENUM_VALUES(ctf_enum_value("zero", 0) ctf_enum_value("one", 1)))
10b56aef 19
28f23191
JG
20TRACEPOINT_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)))
10b56aef 24
28f23191
JG
25TRACEPOINT_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")))
358f4691 30
10b56aef
MD
31/*
32 * Enumeration field is used twice to make sure the global type declaration
33 * is entered only once in the metadata file.
34 */
28f23191
JG
35TRACEPOINT_EVENT(
36 ust_tests_td,
37 tptest,
10b56aef
MD
38 TP_ARGS(int, enumval, int, enumval2, int, enumval3),
39 TP_FIELDS(
28f23191
JG
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)))
10b56aef
MD
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 */
28f23191
JG
48TRACEPOINT_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)))
10b56aef 52
358f4691
PP
53/*
54 * Test autoincrementing enumeration values.
55 */
28f23191
JG
56TRACEPOINT_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)))
358f4691 64
10b56aef
MD
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.046452 seconds and 4 git commands to generate.