summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-04-10 08:54:16 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-04-14 09:43:40 -0400
commitea20d9293ce423a39717ed4375393129a2e701f9 (patch)
tree30cbfd532e6541c17eb69a63044cfe7bce6cf974 /kernel
parent0a19e53c1514ad8e9c3cbab40c6c3f52c86f403d (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.c1
-rw-r--r--kernel/trace/trace_events_stage_1.h4
-rw-r--r--kernel/trace/trace_events_stage_2.h8
-rw-r--r--kernel/trace/trace_events_stage_3.h4
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 @@
#include "trace_output.h"
+#define TRACE_HEADER_MULTI_READ
#include "trace_events_stage_1.h"
#include "trace_events_stage_2.h"
#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 @@
/*
* Stage 1 of the trace events.
*
- * Override the macros in <trace/trace_event_types.h> to include the following:
+ * Override the macros in <trace/trace_events.h> to include the following:
*
* struct ftrace_raw_<call> {
* struct trace_entry ent;
@@ -36,4 +36,4 @@
}; \
static struct ftrace_event_call event_##name
-#include <trace/trace_event_types.h>
+#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 @@
/*
* Stage 2 of the trace events.
*
- * Override the macros in <trace/trace_event_types.h> to include the following:
+ * Override the macros in <trace/trace_events.h> to include the following:
*
* enum print_line_t
* ftrace_raw_output_<call>(struct trace_iterator *iter, int flags)
@@ -64,7 +64,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
return TRACE_TYPE_HANDLED; \
}
-#include <trace/trace_event_types.h>
+#include <trace/trace_events.h>
/*
* Setup the showing format of trace point.
@@ -128,7 +128,7 @@ ftrace_format_##call(struct trace_seq *s) \
return ret; \
}
-#include <trace/trace_event_types.h>
+#include <trace/trace_events.h>
#undef __field
#define __field(type, item) \
@@ -167,4 +167,4 @@ ftrace_define_fields_##call(void) \
return ret; \
}
-#include <trace/trace_event_types.h>
+#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 @@
/*
* Stage 3 of the trace events.
*
- * Override the macros in <trace/trace_event_types.h> to include the following:
+ * Override the macros in <trace/trace_events.h> to include the following:
*
* static void ftrace_event_<call>(proto)
* {
@@ -272,7 +272,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
_TRACE_PROFILE_INIT(call) \
}
-#include <trace/trace_event_types.h>
+#include <trace/trace_events.h>
#undef _TRACE_PROFILE
#undef _TRACE_PROFILE_INIT