Fix: disable x86 kvm instrumentation for kernels < 2.6.38
[lttng-modules.git] / probes / lttng-tracepoint-event.h
1 #ifndef LTTNG_TRACEPOINT_EVENT_H
2 #define LTTNG_TRACEPOINT_EVENT_H
3
4 /*
5 * lttng-tracepoint-event.h
6 *
7 * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; only
12 * version 2.1 of the License.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24 #include <linux/tracepoint.h>
25
26 /*
27 * If code defines LTTNG_INSTRUMENTATION before including the instrumentation
28 * header, generate the instrumentation static inlines. Else, it means
29 * we are a probe for the Linux kernel, and it is the probe responsibility
30 * to have already included the Linux kernel instrumentation header.
31 */
32 #ifdef LTTNG_INSTRUMENTATION
33 #define _LTTNG_INSTRUMENTATION(...) __VA_ARGS__
34 #else
35 #define _LTTNG_INSTRUMENTATION(...)
36 #endif
37
38 #define LTTNG_TRACEPOINT_EVENT(name, proto, args, struct, assign, print) \
39 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
40 #define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code, tstruct, assign, print) \
41 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
42 #define LTTNG_TRACEPOINT_EVENT_MAP(name, map, proto, args, tstruct, assign, print) \
43 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
44 #define LTTNG_TRACEPOINT_EVENT_FN(name, proto, args, struct, assign, print, reg, unreg) \
45 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
46 #define LTTNG_TRACEPOINT_EVENT_FN_MAP(name, map, proto, args, tstruct, assign, print, reg, unreg) \
47 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
48 #define LTTNG_TRACEPOINT_EVENT_CONDITION(name, proto, args, cond, struct, assign, print) \
49 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
50 #define LTTNG_TRACEPOINT_EVENT_CONDITION_MAP(name, map, proto, args, cond, struct, assign, print) \
51 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
52 #define LTTNG_TRACEPOINT_EVENT_MAP_NOARGS(name, map, struct, assign, print) \
53 _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
54
55 #define LTTNG_TRACEPOINT_EVENT_CLASS(name, proto, args, tstruct, assign, print)
56 #define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _tstruct, _assign, _print)
57 #define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _tstruct, _assign, _print)
58
59 #define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \
60 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
61 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name) \
62 _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
63 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(template, name, proto, args, print) \
64 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
65 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT_MAP(template, name, map, proto, args, print) \
66 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
67 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_CONDITION(template, name, proto, args, cond) \
68 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
69 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_CONDITION_MAP(template, name, map, proto, args, cond) \
70 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
71 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \
72 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
73 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \
74 _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
75
76 #endif /* LTTNG_TRACEPOINT_EVENT_H */
This page took 0.030302 seconds and 4 git commands to generate.