1 #ifndef LTTNG_TRACEPOINT_EVENT_H
2 #define LTTNG_TRACEPOINT_EVENT_H
5 * lttng-tracepoint-event.h
7 * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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.
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.
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
24 #include <linux/tracepoint.h>
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.
32 #ifdef LTTNG_INSTRUMENTATION
33 #define _LTTNG_INSTRUMENTATION(...) __VA_ARGS__
35 #define _LTTNG_INSTRUMENTATION(...)
38 #define LTTNG_TRACEPOINT_EVENT(name, proto, args, fields) \
39 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
40 #define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code_pre, fields, _code_post) \
41 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
42 #define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code_pre, fields, _code_post) \
43 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
44 #define LTTNG_TRACEPOINT_EVENT_MAP(name, map, proto, args, fields) \
45 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
46 #define LTTNG_TRACEPOINT_EVENT_MAP_NOARGS(name, map, fields) \
47 _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
49 #define LTTNG_TRACEPOINT_EVENT_CLASS(name, proto, args, fields)
50 #define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post)
51 #define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post)
53 #define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \
54 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
55 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name) \
56 _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
57 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \
58 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
59 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \
60 _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
62 #define LTTNG_TRACEPOINT_ENUM(_name, _values)
64 #endif /* LTTNG_TRACEPOINT_EVENT_H */
This page took 0.030339 seconds and 4 git commands to generate.