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
,
18 TP_ENUM_VALUES(ctf_enum_value("zero", 0) ctf_enum_value("one", 1)))
20 TRACEPOINT_ENUM(ust_tests_td
,
22 TP_ENUM_VALUES(ctf_enum_value("zero", 0) ctf_enum_value("five", 5)
23 ctf_enum_range("ten_to_twenty", 10, 20)))
25 TRACEPOINT_ENUM(ust_tests_td
,
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")))
32 * Enumeration field is used twice to make sure the global type declaration
33 * is entered only once in the metadata file.
38 TP_ARGS(int, enumval
, int, enumval2
, int, enumval3
),
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
)))
45 * Another tracepoint using the global types to make sure each global type is
46 * entered only once in the metadata file.
48 TRACEPOINT_EVENT(ust_tests_td
,
50 TP_ARGS(int, enumval
),
51 TP_FIELDS(ctf_enum(ust_tests_td
, testenum
, unsigned char, enumfield
, enumval
)))
54 * Test autoincrementing enumeration values.
56 TRACEPOINT_EVENT(ust_tests_td
,
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)))
65 #endif /* _TRACEPOINT_UST_TESTS_TD_H */
67 #undef TRACEPOINT_INCLUDE
68 #define TRACEPOINT_INCLUDE "./ust_tests_td.h"
70 /* This part must be outside ifdef protection */
71 #include <lttng/tracepoint-event.h>
This page took 0.033505 seconds and 4 git commands to generate.