2 * Copyright (C) 2014 Geneviève Bastien <gbastien@versatic.net>
4 * SPDX-License-Identifier: MIT
8 #undef TRACEPOINT_PROVIDER
9 #define TRACEPOINT_PROVIDER ust_tests_td
11 #if !defined(_TRACEPOINT_UST_TESTS_TD_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
12 #define _TRACEPOINT_UST_TESTS_TD_H
14 #include <lttng/tracepoint.h>
16 TRACEPOINT_ENUM(ust_tests_td
, testenum
,
18 ctf_enum_value("zero", 0)
19 ctf_enum_value("one", 1)
23 TRACEPOINT_ENUM(ust_tests_td
, testenum2
,
25 ctf_enum_value("zero", 0)
26 ctf_enum_value("five", 5)
27 ctf_enum_range("ten_to_twenty", 10, 20)
31 TRACEPOINT_ENUM(ust_tests_td
, testenum3
,
34 ctf_enum_value("two", 2)
35 ctf_enum_auto("three")
36 ctf_enum_range("ten_to_twenty", 10, 20)
37 ctf_enum_auto("twenty_one")
42 * Enumeration field is used twice to make sure the global type declaration
43 * is entered only once in the metadata file.
45 TRACEPOINT_EVENT(ust_tests_td
, tptest
,
46 TP_ARGS(int, enumval
, int, enumval2
, int, enumval3
),
48 ctf_enum(ust_tests_td
, testenum
, int, enumfield
, enumval
)
49 ctf_enum(ust_tests_td
, testenum
, long long,
50 enumfield_bis
, enumval2
)
51 ctf_enum(ust_tests_td
, testenum2
, unsigned int,
52 enumfield_third
, enumval3
)
57 * Another tracepoint using the global types to make sure each global type is
58 * entered only once in the metadata file.
60 TRACEPOINT_EVENT(ust_tests_td
, tptest_bis
,
61 TP_ARGS(int, enumval
),
63 ctf_enum(ust_tests_td
, testenum
, unsigned char,
69 * Test autoincrementing enumeration values.
71 TRACEPOINT_EVENT(ust_tests_td
, test_auto
,
74 ctf_enum(ust_tests_td
, testenum3
, int, zero
, 0)
75 ctf_enum(ust_tests_td
, testenum3
, int, two
, 2)
76 ctf_enum(ust_tests_td
, testenum3
, int, three
, 3)
77 ctf_enum(ust_tests_td
, testenum3
, int, fifteen
, 15)
78 ctf_enum(ust_tests_td
, testenum3
, int, twenty_one
, 21)
82 #endif /* _TRACEPOINT_UST_TESTS_TD_H */
84 #undef TRACEPOINT_INCLUDE
85 #define TRACEPOINT_INCLUDE "./ust_tests_td.h"
87 /* This part must be outside ifdef protection */
88 #include <lttng/tracepoint-event.h>
This page took 0.03173 seconds and 4 git commands to generate.