1 /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
7 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * Protect against multiple inclusion of structure declarations, but run the
12 * stages below each time.
14 #ifndef _LTTNG_PROBES_LTTNG_TYPES_H
15 #define _LTTNG_PROBES_LTTNG_TYPES_H
17 #include <linux/seq_file.h>
18 #include <probes/lttng.h>
19 #include <lttng-events.h>
20 #include <lttng-tracer.h>
21 #include <lttng-endian.h>
23 #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */
25 /* Export enumerations */
27 #ifdef STAGE_EXPORT_ENUMS
29 #undef TRACE_EVENT_TYPE
30 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...)
32 #undef TRACE_EVENT_ENUM
33 #define TRACE_EVENT_ENUM(_name, _entries...) \
34 const struct lttng_enum_entry __trace_event_enum_##_name[] = { \
38 /* Enumeration entry (single value) */
40 #define V(_string) { _string, _string, #_string}
42 /* Enumeration entry (range) */
44 #define R(_string, _range_start, _range_end) \
45 { _range_start, _range_end, #_string }
47 #endif /* STAGE_EXPORT_ENUMS */
50 /* Export named types */
52 #ifdef STAGE_EXPORT_TYPES
54 #undef TRACE_EVENT_TYPE___enum
55 #define TRACE_EVENT_TYPE___enum(_name, _container_type) \
58 .container_type = __type_integer(_container_type, 0, 0, -1, __BYTE_ORDER, 10, none), \
59 .entries = __trace_event_enum_##_name, \
60 .len = ARRAY_SIZE(__trace_event_enum_##_name), \
63 /* Local declaration */
64 #undef TRACE_EVENT_TYPE
65 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...) \
66 TRACE_EVENT_TYPE___##_abstract_type(_name, args)
68 #undef TRACE_EVENT_ENUM
69 #define TRACE_EVENT_ENUM(_name, _entries...)
71 #endif /* STAGE_EXPORT_TYPES */
This page took 0.032637 seconds and 4 git commands to generate.