public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhaolei <zhaolei@cn.fujitsu.com>
To: "Steven Rostedt ;" <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] ftrace: Code cleanup for kernel/trace/trace_events_stage_*.h
Date: Fri, 03 Apr 2009 18:26:19 +0800	[thread overview]
Message-ID: <49D5E44B.3080104@cn.fujitsu.com> (raw)
In-Reply-To: <49D5E3EE.70201@cn.fujitsu.com>

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@cn.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



  reply	other threads:[~2009-04-03 10:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03 10:24 [PATCH 1/2] ftrace: Correct a text align for event format output Zhaolei
2009-04-03 10:26 ` Zhaolei [this message]
2009-04-07  1:54   ` [PATCH 2/2] ftrace: Code cleanup for kernel/trace/trace_events_stage_*.h Steven Rostedt
2009-04-08  7:04     ` Jiaying Zhang
     [not found]     ` <5df78e1d0904072328v11e03131y5256d5c2ba9c03d@mail.gmail.com>
2009-04-08  7:04       ` Zhaolei
2009-04-08  7:16         ` Jiaying Zhang
2009-04-16 14:55     ` Steven Rostedt
2009-04-17  0:31       ` Zhaolei
2009-04-07  1:50 ` [PATCH 1/2] ftrace: Correct a text align for event format output Steven Rostedt
2009-04-07 13:13 ` [tip:tracing/urgent] " Zhaolei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49D5E44B.3080104@cn.fujitsu.com \
    --to=zhaolei@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox