Update ring buffer and pretty print
[lttng-modules.git] / probes / lttng-types.h
1 /*
2 * Protect against multiple inclusion of structure declarations, but run the
3 * stages below each time.
4 */
5 #ifndef _LTTNG_PROBES_LTTNG_TYPES_H
6 #define _LTTNG_PROBES_LTTNG_TYPES_H
7
8 #include <linux/seq_file.h>
9 #include "lttng.h"
10 #include "../ltt-events.h"
11 #include "../ltt-tracer.h"
12 #include "../ltt-endian.h"
13
14 #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */
15
16 /* Export enumerations */
17
18 #ifdef STAGE_EXPORT_ENUMS
19
20 #undef TRACE_EVENT_TYPE
21 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...)
22
23 #undef TRACE_EVENT_ENUM
24 #define TRACE_EVENT_ENUM(_name, _entries...) \
25 const struct lttng_enum_entry __trace_event_enum_##_name[] = { \
26 PARAMS(_entries) \
27 };
28
29 /* Enumeration entry (single value) */
30 #undef V
31 #define V(_string) { _string, _string, #_string}
32
33 /* Enumeration entry (range) */
34 #undef R
35 #define R(_string, _range_start, _range_end) \
36 { _range_start, _range_end, #_string }
37
38 #endif /* STAGE_EXPORT_ENUMS */
39
40
41 /* Export named types */
42
43 #ifdef STAGE_EXPORT_TYPES
44
45 #undef TRACE_EVENT_TYPE___enum
46 #define TRACE_EVENT_TYPE___enum(_name, _container_type) \
47 { \
48 .name = #_name, \
49 .container_type = __type_integer(_container_type, __BYTE_ORDER, 10, none), \
50 .entries = __trace_event_enum_##_name, \
51 .len = ARRAY_SIZE(__trace_event_enum_##_name), \
52 },
53
54 /* Local declaration */
55 #undef TRACE_EVENT_TYPE
56 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...) \
57 TRACE_EVENT_TYPE___##_abstract_type(_name, args)
58
59 #undef TRACE_EVENT_ENUM
60 #define TRACE_EVENT_ENUM(_name, _entries...)
61
62 #endif /* STAGE_EXPORT_TYPES */
This page took 0.031421 seconds and 4 git commands to generate.