From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: rostedt@goodmis.org
Cc: Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
Masami Hiramatsu <mhiramat@redhat.com>,
Jason Baron <jbaron@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 06/10] tracing: add print_fmt field
Date: Fri, 11 Dec 2009 09:17:17 +0800 [thread overview]
Message-ID: <4B219D9D.70102@cn.fujitsu.com> (raw)
In-Reply-To: <1260491104.2146.314.camel@gandalf.stny.rr.com>
Steven Rostedt wrote:
> On Wed, 2009-12-09 at 15:15 +0800, Lai Jiangshan wrote:
>> Add print_fmt field and the initialization codes.
>> It will be used for replacing ->show_format().
>
> This change log is very lacking. I don't even know what this patch is
> doing. I'm guessing other patches will depend on it. But this patch
> alone should have a change log that describes the goal that will happen
> to give it rational.
>
> If I'm bisecting the kernel and I come across this change, I want the
> change log to explain why this change exists, and not have to spend time
> searching the logs for other patches that may depend on this one.
>
>
For a format file
# cat events/irq/irq_handler_entry/format
name: irq_handler_entry
ID: 97
format:
A) ======> name, ID, and a string "format:"
field:unsigned short common_type; offset:0; size:2; signed:0;
field:unsigned char common_flags; offset:2; size:1; signed:0;
field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
field:int common_pid; offset:4; size:4; signed:1;
field:int common_lock_depth; offset:8; size:4; signed:1;
field:int irq; offset:12; size:4; signed:1;
field:__data_loc char[] name; offset:16; size:4; signed:1;
B) ========> fields.
print fmt: "irq=%d name=%s", REC->irq, __get_str(name)
C) ========> string "print fmt: " and the print format after it.
How my patches work:
For B)
Ensure all fields are add into struct ftrace_event_call->fields. (patch#4)
Ensure all fields are correct. (patch#5)
For C)
add a print_fmt field (this patch)
init print_fmt carefully (this patch and patch#7 patch#8)
So when we generate format file:
print name
print ID
print string "format:"
use struct ftrace_event_call->fields to print fields
use struct ftrace_event_call->print_fmt to print "print fmt: XXXXXXXXXXX"
Thanks
-- Lai
next prev parent reply other threads:[~2009-12-11 1:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 7:15 [PATCH 06/10] tracing: add print_fmt field Lai Jiangshan
2009-12-11 0:25 ` Steven Rostedt
2009-12-11 1:17 ` Lai Jiangshan [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-12-15 7:39 Lai Jiangshan
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=4B219D9D.70102@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--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