From: Steven Rostedt <rostedt@goodmis.org>
To: Li Zefan <lizf@cn.fujitsu.com>
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: Thu, 03 Jun 2010 22:13:11 -0400 [thread overview]
Message-ID: <1275617591.15884.67.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <4C0860DE.5020609@cn.fujitsu.com>
On Fri, 2010-06-04 at 10:11 +0800, Li Zefan wrote:
> > +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.
And a common mistake I do :-p
I'll rebase it with the fix.
>
> What we need to do in start() is move the pointer to postion *pos.
So the rest is OK then? All that is needed is the removal of *pos++ ?
Thanks,
-- Steve
>
> > + 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:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 19:41 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
2010-06-04 2:13 ` Steven Rostedt [this message]
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=1275617591.15884.67.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=James.Bottomley@suse.de \
--cc=fweisbec@gmail.com \
--cc=kusumi.tomohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=martin.petersen@oracle.com \
--cc=mingo@elte.hu \
--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
all inboxes | Powered by JetHome®