From: Frederic Weisbecker <fweisbec@gmail.com>
To: Zhaolei <zhaolei@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ftrace: Output REC->var instead of __entry->var for trace format
Date: Wed, 8 Apr 2009 13:31:30 +0200 [thread overview]
Message-ID: <20090408113129.GA6285@nowhere> (raw)
In-Reply-To: <49DC679D.2090901@cn.fujitsu.com>
On Wed, Apr 08, 2009 at 05:00:13PM +0800, Zhaolei wrote:
> print fmt: "irq=%d return=%s", __entry->irq, __entry->ret ? \"handled\" : \"unhandled\"
>
> "__entry" should be convert to "REC" by __stringify() macro.
>
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
> ---
> kernel/trace/trace_events_stage_2.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace_events_stage_2.h b/kernel/trace/trace_events_stage_2.h
> index 9e47c39..d694a8a 100644
> --- a/kernel/trace/trace_events_stage_2.h
> +++ b/kernel/trace/trace_events_stage_2.h
> @@ -108,10 +108,10 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
> return 0;
>
> #undef __entry
> -#define __entry "REC"
> +#define __entry REC
>
> #undef TP_printk
> -#define TP_printk(fmt, args...) "%s, %s\n", #fmt, #args
> +#define TP_printk(fmt, args...) "%s, %s\n", #fmt, __stringify(args)
>
> #undef TRACE_EVENT
> #define TRACE_EVENT(call, proto, args, tstruct, assign, print) \
> --
> 1.5.5.3
>
>
Nice catch!
The other patch that expands stringify to multiple args looks good too.
next prev parent reply other threads:[~2009-04-08 11:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 8:58 [PATCH 1/2] Make __stringify support variable argument macro Zhaolei
2009-04-08 9:00 ` [PATCH 2/2] ftrace: Output REC->var instead of __entry->var for trace format Zhaolei
2009-04-08 11:29 ` Frederic Weisbecker
2009-04-08 11:31 ` Frederic Weisbecker [this message]
2009-04-08 12:06 ` Ingo Molnar
2009-04-09 0:45 ` [PATCH 2/2] ftrace: Output REC->var instead of __entry->varfor " Zhaolei
2009-04-10 13:46 ` Ingo Molnar
2009-04-10 14:06 ` [tip:tracing/urgent] ftrace: Output REC->var instead of __entry->var for " Zhaolei
2009-04-10 14:06 ` [tip:tracing/urgent] Make __stringify support variable argument macros too 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=20090408113129.GA6285@nowhere \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=zhaolei@cn.fujitsu.com \
/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