diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-04-10 08:54:16 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-04-14 09:43:40 -0400 |
commit | ea20d9293ce423a39717ed4375393129a2e701f9 (patch) | |
tree | 30cbfd532e6541c17eb69a63044cfe7bce6cf974 /kernel | |
parent | 0a19e53c1514ad8e9c3cbab40c6c3f52c86f403d (diff) |
tracing: consolidate trace and trace_event headers
Impact: clean up
Neil Horman (et. al.) criticized the way the trace events were broken up
into two files. The reason for that was that ftrace needed to separate out
the declarations from where the #include <linux/tracepoint.h> was used.
It then dawned on me that the tracepoint.h header only needs to define the
TRACE_EVENT macro if it is not already defined.
The solution is simply to test if TRACE_EVENT is defined, and if it is not
then the linux/tracepoint.h header can define it. This change consolidates
all the <traces>.h and <traces>_event_types.h into the <traces>.h file.
Reported-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Theodore Tso <tytso@mit.edu>
Reported-by: Jiaying Zhang <jiayingz@google.com>
Cc: Zhaolei <zhaolei@cn.fujitsu.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/events.c | 1 | ||||
-rw-r--r-- | kernel/trace/trace_events_stage_1.h | 4 | ||||
-rw-r--r-- | kernel/trace/trace_events_stage_2.h | 8 | ||||
-rw-r--r-- | kernel/trace/trace_events_stage_3.h | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/kernel/trace/events.c b/kernel/trace/events.c index 246f2aa6dc46..5a35a914f0e2 100644 --- a/kernel/trace/events.c +++ b/kernel/trace/events.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include "trace_output.h" | 9 | #include "trace_output.h" |
10 | 10 | ||
11 | #define TRACE_HEADER_MULTI_READ | ||
11 | #include "trace_events_stage_1.h" | 12 | #include "trace_events_stage_1.h" |
12 | #include "trace_events_stage_2.h" | 13 | #include "trace_events_stage_2.h" |
13 | #include "trace_events_stage_3.h" | 14 | #include "trace_events_stage_3.h" |
diff --git a/kernel/trace/trace_events_stage_1.h b/kernel/trace/trace_events_stage_1.h index 38985f9b379c..475f46a047ae 100644 --- a/kernel/trace/trace_events_stage_1.h +++ b/kernel/trace/trace_events_stage_1.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Stage 1 of the trace events. | 2 | * Stage 1 of the trace events. |
3 | * | 3 | * |
4 | * Override the macros in <trace/trace_event_types.h> to include the following: | 4 | * Override the macros in <trace/trace_events.h> to include the following: |
5 | * | 5 | * |
6 | * struct ftrace_raw_<call> { | 6 | * struct ftrace_raw_<call> { |
7 | * struct trace_entry ent; | 7 | * struct trace_entry ent; |
@@ -36,4 +36,4 @@ | |||
36 | }; \ | 36 | }; \ |
37 | static struct ftrace_event_call event_##name | 37 | static struct ftrace_event_call event_##name |
38 | 38 | ||
39 | #include <trace/trace_event_types.h> | 39 | #include <trace/trace_events.h> |
diff --git a/kernel/trace/trace_events_stage_2.h b/kernel/trace/trace_events_stage_2.h index 59cfd7dfe68d..aa4a67a0656f 100644 --- a/kernel/trace/trace_events_stage_2.h +++ b/kernel/trace/trace_events_stage_2.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Stage 2 of the trace events. | 2 | * Stage 2 of the trace events. |
3 | * | 3 | * |
4 | * Override the macros in <trace/trace_event_types.h> to include the following: | 4 | * Override the macros in <trace/trace_events.h> to include the following: |
5 | * | 5 | * |
6 | * enum print_line_t | 6 | * enum print_line_t |
7 | * ftrace_raw_output_<call>(struct trace_iterator *iter, int flags) | 7 | * ftrace_raw_output_<call>(struct trace_iterator *iter, int flags) |
@@ -64,7 +64,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ | |||
64 | return TRACE_TYPE_HANDLED; \ | 64 | return TRACE_TYPE_HANDLED; \ |
65 | } | 65 | } |
66 | 66 | ||
67 | #include <trace/trace_event_types.h> | 67 | #include <trace/trace_events.h> |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Setup the showing format of trace point. | 70 | * Setup the showing format of trace point. |
@@ -128,7 +128,7 @@ ftrace_format_##call(struct trace_seq *s) \ | |||
128 | return ret; \ | 128 | return ret; \ |
129 | } | 129 | } |
130 | 130 | ||
131 | #include <trace/trace_event_types.h> | 131 | #include <trace/trace_events.h> |
132 | 132 | ||
133 | #undef __field | 133 | #undef __field |
134 | #define __field(type, item) \ | 134 | #define __field(type, item) \ |
@@ -167,4 +167,4 @@ ftrace_define_fields_##call(void) \ | |||
167 | return ret; \ | 167 | return ret; \ |
168 | } | 168 | } |
169 | 169 | ||
170 | #include <trace/trace_event_types.h> | 170 | #include <trace/trace_events.h> |
diff --git a/kernel/trace/trace_events_stage_3.h b/kernel/trace/trace_events_stage_3.h index 5bb1b7ffbdb6..45c04e1f38db 100644 --- a/kernel/trace/trace_events_stage_3.h +++ b/kernel/trace/trace_events_stage_3.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Stage 3 of the trace events. | 2 | * Stage 3 of the trace events. |
3 | * | 3 | * |
4 | * Override the macros in <trace/trace_event_types.h> to include the following: | 4 | * Override the macros in <trace/trace_events.h> to include the following: |
5 | * | 5 | * |
6 | * static void ftrace_event_<call>(proto) | 6 | * static void ftrace_event_<call>(proto) |
7 | * { | 7 | * { |
@@ -272,7 +272,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
272 | _TRACE_PROFILE_INIT(call) \ | 272 | _TRACE_PROFILE_INIT(call) \ |
273 | } | 273 | } |
274 | 274 | ||
275 | #include <trace/trace_event_types.h> | 275 | #include <trace/trace_events.h> |
276 | 276 | ||
277 | #undef _TRACE_PROFILE | 277 | #undef _TRACE_PROFILE |
278 | #undef _TRACE_PROFILE_INIT | 278 | #undef _TRACE_PROFILE_INIT |