2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 #ifdef TRACEPOINT_CREATE_PROBES
9 #define __tp_stringify1(x) #x
10 #define __tp_stringify(x) __tp_stringify1(x)
12 #undef TRACEPOINT_EVENT_INSTANCE
13 #define TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _args)
15 #undef TRACEPOINT_EVENT
16 #define TRACEPOINT_EVENT(_provider, _name, _args, _fields) \
17 TRACEPOINT_EVENT_CLASS(_provider, _name, _TP_PARAMS(_args), \
18 _TP_PARAMS(_fields)) \
19 TRACEPOINT_EVENT_INSTANCE(_provider, _name, _name, \
23 #undef TRACEPOINT_CREATE_PROBES
25 #define TRACEPOINT_HEADER_MULTI_READ
28 * LTTng-UST 2.0 expects TRACEPOINT_INCLUDE_FILE, but this approach has
29 * the unwanted side-effect of expanding any macro name found within
30 * TRACEPOINT_INCLUDE_FILE.
32 * Starting from LTTng-UST 2.1, we expect the TRACEPOINT_INCLUDE to be
33 * defined by probes as a string. We still check for
34 * TRACEPOINT_INCLUDE_FILE for API backward compatibility.
36 #ifdef TRACEPOINT_INCLUDE_FILE
37 #define TRACEPOINT_INCLUDE __tp_stringify(TRACEPOINT_INCLUDE_FILE)
40 #include TRACEPOINT_INCLUDE
42 #include <lttng/ust-tracepoint-event.h>
44 #undef TRACEPOINT_HEADER_MULTI_READ
45 #undef TRACEPOINT_INCLUDE_FILE
46 #undef TRACEPOINT_INCLUDE
48 #define TRACEPOINT_CREATE_PROBES
51 * Put back definitions to the state they were when defined by
55 #define TP_ARGS(...) __VA_ARGS__
57 #undef TRACEPOINT_EVENT
58 #define TRACEPOINT_EVENT(provider, name, args, fields) \
59 _DECLARE_TRACEPOINT(provider, name, _TP_PARAMS(args)) \
60 _DEFINE_TRACEPOINT(provider, name, _TP_PARAMS(args))
62 #undef TRACEPOINT_EVENT_CLASS
63 #define TRACEPOINT_EVENT_CLASS(provider, name, args, fields)
65 #undef TRACEPOINT_EVENT_INSTANCE
66 #define TRACEPOINT_EVENT_INSTANCE(provider, _template, name, args) \
67 _DECLARE_TRACEPOINT(provider, name, _TP_PARAMS(args)) \
68 _DEFINE_TRACEPOINT(provider, name, _TP_PARAMS(args))
70 #undef TRACEPOINT_LOGLEVEL
71 #define TRACEPOINT_LOGLEVEL(provider, name, loglevel)
73 #undef TRACEPOINT_MODEL_EMF_URI
74 #define TRACEPOINT_MODEL_EMF_URI(provider, name, uri)
76 #endif /* TRACEPOINT_CREATE_PROBES */
This page took 0.030428 seconds and 4 git commands to generate.