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>
This commit is contained in:
Steven Rostedt
2009-04-14 09:43:40 -04:00
committed by Steven Rostedt
parent 0a19e53c15
commit ea20d9293c
15 changed files with 663 additions and 518 deletions
+1
View File
@@ -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"
+2 -2
View File
@@ -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>
+4 -4
View File
@@ -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>
+2 -2
View File
@@ -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