[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49D5E44B.3080104@cn.fujitsu.com>
Date: Fri, 03 Apr 2009 18:26:19 +0800
From: Zhaolei <zhaolei@...fujitsu.com>
To: "Steven Rostedt ;" <rostedt@...dmis.org>
CC: linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] ftrace: Code cleanup for kernel/trace/trace_events_stage_*.h
Add TRACE_FORMAT's define for trace_events_stage_2.h.
Although it is already defined in trace_events_stage_1.h, we should make each
function independence.
Move TP_fast_assign's define from trace_events_stage_2.h to
trace_events_stage_3.h because it is used there.
Unify TRACE_EVENT's 5th argument's name to "assign"
Impact: cleanup, no functionality changed
Signed-off-by: Zhao Lei <zhaolei@...fujitsu.com>
---
kernel/trace/trace_events_stage_2.h | 8 ++++----
kernel/trace/trace_events_stage_3.h | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/trace_events_stage_2.h b/kernel/trace/trace_events_stage_2.h
index 30743f7..9e47c39 100644
--- a/kernel/trace/trace_events_stage_2.h
+++ b/kernel/trace/trace_events_stage_2.h
@@ -32,6 +32,9 @@
* in binary.
*/
+#undef TRACE_FORMAT
+#define TRACE_FORMAT(call, proto, args, fmt)
+
#undef __entry
#define __entry field
@@ -110,11 +113,8 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
#undef TP_printk
#define TP_printk(fmt, args...) "%s, %s\n", #fmt, #args
-#undef TP_fast_assign
-#define TP_fast_assign(args...) args
-
#undef TRACE_EVENT
-#define TRACE_EVENT(call, proto, args, tstruct, func, print) \
+#define TRACE_EVENT(call, proto, args, tstruct, assign, print) \
static int \
ftrace_format_##call(struct trace_seq *s) \
{ \
diff --git a/kernel/trace/trace_events_stage_3.h b/kernel/trace/trace_events_stage_3.h
index 9d2fa78..49b305a 100644
--- a/kernel/trace/trace_events_stage_3.h
+++ b/kernel/trace/trace_events_stage_3.h
@@ -193,6 +193,9 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
_TRACE_PROFILE_INIT(call) \
}
+#undef TP_fast_assign
+#define TP_fast_assign(args...) args
+
#undef __entry
#define __entry entry
--
1.5.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists