bytecode: rename `lttng_filter_sync_state()` -> `lttng_bytecode_filter_sync_state()`
[lttng-modules.git] / include / lttng / tracepoint-event.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
9f36eaed 2 *
3b4aafcb 3 * lttng/tracepoint-event.h
3bc29f0a
MD
4 *
5 * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3bc29f0a
MD
6 */
7
9f36eaed
MJ
8#ifndef LTTNG_TRACEPOINT_EVENT_H
9#define LTTNG_TRACEPOINT_EVENT_H
10
3bc29f0a
MD
11#include <linux/tracepoint.h>
12
13/*
14 * If code defines LTTNG_INSTRUMENTATION before including the instrumentation
15 * header, generate the instrumentation static inlines. Else, it means
16 * we are a probe for the Linux kernel, and it is the probe responsibility
17 * to have already included the Linux kernel instrumentation header.
18 */
19#ifdef LTTNG_INSTRUMENTATION
20#define _LTTNG_INSTRUMENTATION(...) __VA_ARGS__
21#else
22#define _LTTNG_INSTRUMENTATION(...)
23#endif
24
f127e61e 25#define LTTNG_TRACEPOINT_EVENT(name, proto, args, fields) \
3bc29f0a 26 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
265822ae 27#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code_pre, fields, _code_post) \
3bc29f0a 28 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
265822ae 29#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code_pre, fields, _code_post) \
3bc29f0a 30 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
f127e61e 31#define LTTNG_TRACEPOINT_EVENT_MAP(name, map, proto, args, fields) \
3bc29f0a 32 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
f127e61e 33#define LTTNG_TRACEPOINT_EVENT_MAP_NOARGS(name, map, fields) \
3bc29f0a
MD
34 _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
35
f127e61e 36#define LTTNG_TRACEPOINT_EVENT_CLASS(name, proto, args, fields)
265822ae
MD
37#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post)
38#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post)
3bc29f0a
MD
39
40#define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \
41 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
42#define LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name) \
43 _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
3bc29f0a
MD
44#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \
45 _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
46#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \
47 _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
48
141ddf28
MD
49#define LTTNG_TRACEPOINT_ENUM(_name, _values)
50
3bc29f0a 51#endif /* LTTNG_TRACEPOINT_EVENT_H */
This page took 0.03873 seconds and 4 git commands to generate.