2 * Protect against multiple inclusion of structure declarations, but run the
3 * stages below each time.
5 #ifndef _LTTNG_PROBES_LTTNG_TYPES_H
6 #define _LTTNG_PROBES_LTTNG_TYPES_H
13 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; only
18 * version 2.1 of the License.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30 #include <linux/seq_file.h>
32 #include "../lttng-events.h"
33 #include "../lttng-tracer.h"
34 #include "../lttng-endian.h"
36 #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */
38 /* Export enumerations */
40 #ifdef STAGE_EXPORT_ENUMS
42 #undef TRACE_EVENT_TYPE
43 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...)
45 #undef TRACE_EVENT_ENUM
46 #define TRACE_EVENT_ENUM(_name, _entries...) \
47 const struct lttng_enum_entry __trace_event_enum_##_name[] = { \
51 /* Enumeration entry (single value) */
53 #define V(_string) { _string, _string, #_string}
55 /* Enumeration entry (range) */
57 #define R(_string, _range_start, _range_end) \
58 { _range_start, _range_end, #_string }
60 #endif /* STAGE_EXPORT_ENUMS */
63 /* Export named types */
65 #ifdef STAGE_EXPORT_TYPES
67 #undef TRACE_EVENT_TYPE___enum
68 #define TRACE_EVENT_TYPE___enum(_name, _container_type) \
71 .container_type = __type_integer(_container_type, __BYTE_ORDER, 10, none), \
72 .entries = __trace_event_enum_##_name, \
73 .len = ARRAY_SIZE(__trace_event_enum_##_name), \
76 /* Local declaration */
77 #undef TRACE_EVENT_TYPE
78 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...) \
79 TRACE_EVENT_TYPE___##_abstract_type(_name, args)
81 #undef TRACE_EVENT_ENUM
82 #define TRACE_EVENT_ENUM(_name, _entries...)
84 #endif /* STAGE_EXPORT_TYPES */
This page took 0.030126 seconds and 4 git commands to generate.