2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2014 Geneviève Bastien <gbastien@versatic.net>
7 #undef LTTNG_UST_TRACEPOINT_PROVIDER
8 #define LTTNG_UST_TRACEPOINT_PROVIDER ust_tests_ust_fields
10 #if !defined(_TRACEPOINT_UST_TESTS_UST_FIELDS_H) || defined(LTTNG_UST_TRACEPOINT_HEADER_MULTI_READ)
11 #define _TRACEPOINT_UST_TESTS_UST_FIELDS_H
13 #include <lttng/tracepoint.h>
15 LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ust_fields
, testenum
,
16 LTTNG_UST_TP_ENUM_VALUES(
17 lttng_ust_field_enum_value("even", 0)
18 lttng_ust_field_enum_value("uneven", 1)
19 lttng_ust_field_enum_range("twoto4", 2, 4)
20 lttng_ust_field_enum_value("five\"extra\\test", 5)
24 LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ust_fields
, testenum2
,
25 LTTNG_UST_TP_ENUM_VALUES(
26 lttng_ust_field_enum_value("zero", 0)
27 lttng_ust_field_enum_value("five", 5)
28 lttng_ust_field_enum_range("ten_to_twenty", 10, 20)
33 * Enumeration field is used twice to make sure the type declaration
34 * is entered only once in the metadata file.
36 LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ust_fields
, tptest
,
37 LTTNG_UST_TP_ARGS(int, anint
, int, enumval
, int, enumval2
),
39 lttng_ust_field_integer(int, intfield
, anint
)
40 lttng_ust_field_enum(ust_tests_ust_fields
, testenum
, int, enumfield
, enumval
)
41 lttng_ust_field_enum(ust_tests_ust_fields
, testenum
, long long,
42 enumfield_bis
, enumval
)
43 lttng_ust_field_enum(ust_tests_ust_fields
, testenum2
, unsigned int,
44 enumfield_third
, enumval2
)
49 * Another tracepoint using the types to make sure each type is entered
50 * only once in the metadata file.
52 LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ust_fields
, tptest_bis
,
53 LTTNG_UST_TP_ARGS(int, anint
, int, enumval
),
55 lttng_ust_field_integer(int, intfield
, anint
)
56 lttng_ust_field_enum(ust_tests_ust_fields
, testenum
, unsigned char,
61 #endif /* _TRACEPOINT_UST_TESTS_UST_FIELDS_H */
63 #undef LTTNG_UST_TRACEPOINT_INCLUDE
64 #define LTTNG_UST_TRACEPOINT_INCLUDE "./ust_tests_ust_fields.h"
66 /* This part must be outside ifdef protection */
67 #include <lttng/tracepoint-event.h>
This page took 0.029972 seconds and 4 git commands to generate.