From: Li Zefan <lizf@cn.fujitsu.com>
To: rostedt@goodmis.org
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>,
James Bottomley <James.Bottomley@suse.de>,
Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>,
Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Subject: Re: [PATCH][GIT PULL][v2.6.35] tracing/events: Convert format output to seq_file
Date: Fri, 04 Jun 2010 10:11:42 +0800 [thread overview]
Message-ID: <4C0860DE.5020609@cn.fujitsu.com> (raw)
In-Reply-To: <1275594103.15884.35.camel@gandalf.stny.rr.com>
> +static void *f_start(struct seq_file *m, loff_t *pos)
> +{
> + loff_t l = 1;
> + void *p;
> +
> + /* Start by showing the header */
> + if (!*pos) {
> + (*pos)++;
We shoudn't increment *pos in start() handler. It's a common mistake when
using seqfile.
What we need to do in start() is move the pointer to postion *pos.
> + return (void *)FORMAT_HEADER;
> }
>
> - if (r)
> - r = trace_seq_printf(s, "\nprint fmt: %s\n",
> - call->print_fmt);
> + p = (void *)FORMAT_HEADER;
> + do {
> + p = f_next(m, p, &l);
> + } while (p && l < *pos);
>
> - if (!r) {
> - /*
> - * ug! The format output is bigger than a PAGE!!
> - */
> - buf = "FORMAT TOO BIG\n";
> - r = simple_read_from_buffer(ubuf, cnt, ppos,
> - buf, strlen(buf));
> - goto out;
> + return p;
> +}
next prev parent reply other threads:[~2010-06-04 2:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 19:41 [PATCH][GIT PULL][v2.6.35] tracing/events: Convert format output to seq_file Steven Rostedt
2010-06-04 1:39 ` Li Zefan
2010-06-04 2:11 ` Steven Rostedt
2010-06-04 4:14 ` Steven Rostedt
2010-06-04 6:01 ` Li Zefan
2010-06-04 2:11 ` Li Zefan [this message]
2010-06-04 2:13 ` Steven Rostedt
2010-06-04 2:26 ` Li Zefan
2010-06-04 3:27 ` [PATCH v2][GIT " Steven Rostedt
2010-06-07 7:57 ` Kei Tokunaga
2010-06-07 21:00 ` Steven Rostedt
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=4C0860DE.5020609@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=James.Bottomley@suse.de \
--cc=fweisbec@gmail.com \
--cc=kusumi.tomohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tokunaga.keiich@jp.fujitsu.com \
--cc=xiaoguangrong@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