f377ddbcc5ff26eb7c13aed1eedf3f97f3f24363
2 * Copyright (C) 2009 Steven Rostedt <srostedt@redhat.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation;
7 * version 2.1 of the License.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 * Trace files that want to automate creationg of all tracepoints defined
20 * in their file should include this file. The following are macros that the
21 * trace file may define:
23 * TRACE_SYSTEM defines the system the tracepoint is for
25 * TRACE_INCLUDE_FILE if the file name is something other than TRACE_SYSTEM.h
26 * This macro may be defined to tell define_trace.h what file to include.
27 * Note, leave off the ".h".
29 * TRACE_INCLUDE_PATH if the path is something other than core kernel include/trace
30 * then this macro can define the path to use. Note, the path is relative to
31 * define_trace.h, not the file including it. Full path names for out of tree
32 * modules must be used.
35 #ifdef TRACEPOINT_CREATE_PROBES
37 /* Prevent recursion */
38 #undef TRACEPOINT_CREATE_PROBES
40 #include <ust/kcompat/stringify.h>
42 #undef TRACEPOINT_EVENT
43 #define TRACEPOINT_EVENT(name, proto, args, fields) \
44 _DEFINE_TRACEPOINT(name)
46 #undef TRACEPOINT_EVENT_INSTANCE
47 #define TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \
48 _DEFINE_TRACEPOINT(name)
50 #undef TRACEPOINT_EVENT_NOARGS
51 #define TRACEPOINT_EVENT_NOARGS(name, fields) \
52 _DEFINE_TRACEPOINT(name)
54 #undef TRACEPOINT_EVENT_INSTANCE_NOARGS
55 #define TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name) \
56 _DEFINE_TRACEPOINT(name)
59 #undef __TRACE_INCLUDE
61 #ifndef TRACE_INCLUDE_FILE
62 # define TRACE_INCLUDE_FILE TRACE_SYSTEM
63 # define UNDEF_TRACE_INCLUDE_FILE
66 #ifndef TRACE_INCLUDE_PATH
67 # define __TRACE_INCLUDE(system) <trace/events/system.h>
68 # define UNDEF_TRACE_INCLUDE_PATH
70 # define __TRACE_INCLUDE(system) __stringify(TRACE_INCLUDE_PATH/system.h)
73 # define TRACE_INCLUDE(system) __TRACE_INCLUDE(system)
75 /* Let the trace headers be reread */
76 #define TRACE_HEADER_MULTI_READ
78 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
80 #ifndef CONFIG_NO_EVENT_TRACING
81 #include <ust/ust_trace.h>
84 #undef TRACEPOINT_EVENT
85 #undef TRACEPOINT_EVENT_CLASS
86 #undef TRACEPOINT_EVENT_INSTANCE
87 #undef TRACEPOINT_EVENT_NOARGS
88 #undef TRACEPOINT_EVENT_CLASS_NOARGS
89 #undef TRACEPOINT_EVENT_INSTANCE_NOARGS
90 #undef TRACE_HEADER_MULTI_READ
92 /* Only undef what we defined in this file */
93 #ifdef UNDEF_TRACE_INCLUDE_FILE
94 # undef TRACE_INCLUDE_FILE
95 # undef UNDEF_TRACE_INCLUDE_FILE
98 #ifdef UNDEF_TRACE_INCLUDE_PATH
99 # undef TRACE_INCLUDE_PATH
100 # undef UNDEF_TRACE_INCLUDE_PATH
103 /* We may be processing more files */
104 #define TRACEPOINT_CREATE_PROBES
106 #endif /* TRACEPOINT_CREATE_PROBES */
This page took 0.032387 seconds and 4 git commands to generate.