Remove installed headers, cleanup header names
[ust.git] / include / ust / tracepoint_event.h
CommitLineData
22d72948
NC
1/*
2 * Copyright (C) 2009 Steven Rostedt <srostedt@redhat.com>
9edd34bd 3 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
22d72948
NC
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
f37142a4
MD
7 * License as published by the Free Software Foundation;
8 * version 2.1 of the License.
22d72948
NC
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 *
20 * Trace files that want to automate creationg of all tracepoints defined
21 * in their file should include this file. The following are macros that the
22 * trace file may define:
23 *
24 * TRACE_SYSTEM defines the system the tracepoint is for
25 *
26 * TRACE_INCLUDE_FILE if the file name is something other than TRACE_SYSTEM.h
27 * This macro may be defined to tell define_trace.h what file to include.
28 * Note, leave off the ".h".
29 *
30 * TRACE_INCLUDE_PATH if the path is something other than core kernel include/trace
31 * then this macro can define the path to use. Note, the path is relative to
3c82ede9 32 * tracepoint_event.h, not the file including it. Full path names for out of tree
22d72948
NC
33 * modules must be used.
34 */
35
8d71973c 36#ifdef TRACEPOINT_CREATE_PROBES
22d72948
NC
37
38/* Prevent recursion */
8d71973c 39#undef TRACEPOINT_CREATE_PROBES
22d72948 40
3c82ede9
MD
41#ifndef __tp_stringify
42#define __tp_stringify_1(x...) #x
43#define __tp_stringify(x...) __tp_stringify_1(x)
44#endif
22d72948 45
8d71973c 46#undef TRACEPOINT_EVENT
81614639
MD
47#define TRACEPOINT_EVENT(name, proto, args, fields) \
48 _DEFINE_TRACEPOINT(name)
22d72948 49
81614639
MD
50#undef TRACEPOINT_EVENT_INSTANCE
51#define TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \
52 _DEFINE_TRACEPOINT(name)
22d72948 53
81614639
MD
54#undef TRACEPOINT_EVENT_NOARGS
55#define TRACEPOINT_EVENT_NOARGS(name, fields) \
56 _DEFINE_TRACEPOINT(name)
22d72948 57
81614639
MD
58#undef TRACEPOINT_EVENT_INSTANCE_NOARGS
59#define TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name) \
60 _DEFINE_TRACEPOINT(name)
22d72948
NC
61
62#undef TRACE_INCLUDE
63#undef __TRACE_INCLUDE
64
65#ifndef TRACE_INCLUDE_FILE
66# define TRACE_INCLUDE_FILE TRACE_SYSTEM
67# define UNDEF_TRACE_INCLUDE_FILE
68#endif
69
70#ifndef TRACE_INCLUDE_PATH
71# define __TRACE_INCLUDE(system) <trace/events/system.h>
72# define UNDEF_TRACE_INCLUDE_PATH
73#else
3c82ede9 74# define __TRACE_INCLUDE(system) __tp_stringify(TRACE_INCLUDE_PATH/system.h)
22d72948
NC
75#endif
76
77# define TRACE_INCLUDE(system) __TRACE_INCLUDE(system)
78
79/* Let the trace headers be reread */
80#define TRACE_HEADER_MULTI_READ
81
82#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
83
22d72948 84#ifndef CONFIG_NO_EVENT_TRACING
3c82ede9 85#include <ust/probe.h>
22d72948
NC
86#endif
87
8d71973c 88#undef TRACEPOINT_EVENT
81614639
MD
89#undef TRACEPOINT_EVENT_CLASS
90#undef TRACEPOINT_EVENT_INSTANCE
91#undef TRACEPOINT_EVENT_NOARGS
92#undef TRACEPOINT_EVENT_CLASS_NOARGS
93#undef TRACEPOINT_EVENT_INSTANCE_NOARGS
22d72948 94#undef TRACE_HEADER_MULTI_READ
22d72948
NC
95
96/* Only undef what we defined in this file */
97#ifdef UNDEF_TRACE_INCLUDE_FILE
98# undef TRACE_INCLUDE_FILE
99# undef UNDEF_TRACE_INCLUDE_FILE
100#endif
101
102#ifdef UNDEF_TRACE_INCLUDE_PATH
103# undef TRACE_INCLUDE_PATH
104# undef UNDEF_TRACE_INCLUDE_PATH
105#endif
106
107/* We may be processing more files */
8d71973c 108#define TRACEPOINT_CREATE_PROBES
22d72948 109
8d71973c 110#endif /* TRACEPOINT_CREATE_PROBES */
This page took 0.033738 seconds and 4 git commands to generate.