From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: walimis <walimisdev@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] ftrace: fix wrong pos computing when read buffer has been fulfilled.
Date: Tue, 18 Nov 2008 16:52:52 +0100 [thread overview]
Message-ID: <20081118155252.GA2852@elte.hu> (raw)
In-Reply-To: <alpine.DEB.1.10.0811181031200.15003@gandalf.stny.rr.com>
* Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Tue, 18 Nov 2008, walimis wrote:
> > On Tue, Nov 18, 2008 at 09:36:07AM -0500, Steven Rostedt wrote:
> > >>
> > >> fix:
> > >>
> > >> Through checking return value of seq_printf, if less than 0, we know
> > >> this function doesn't be printed. Then we decrease position to force
> > >> this function to be printed next time, in next read buffer.
> > >
> > >A lot of the code for seq files I cut and paste from other places that I
> > >have written it. The seq files always confuse me, so I like to use stuff
> > >that worked before. Some of the things that walimis fixed were not needed
> > >for this file, and was overkill.
>
> > It also confuse me a lot. I also checked all places using seq files in
> > trace/ftrace code, to see whether there are similar problem.
> > - trace.c: in s_start() it force pos to decrease one such as:
> > l = *pos - 1;
> > so it works well.
> > - trace_stack.c: t_start, in almost all cases, can be only called
> > once, so we don't see the error. But I wonder whether it still works
> > well if output message exceeds the size of seq file buffer and call
> > t_start twice. If needed, I can test it.
> > - trace_branch.c : the same with above.
> >
>
> If you can find a bug, then by all means, fix it ;-)
also, if you can think of a way to structure the code in a cleaner way
to make such mistakes less likely to occur, feel free to change that
too.
Ingo
next prev parent reply other threads:[~2008-11-18 15:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-15 7:19 [PATCH 1/1] ftrace: fix wrong pos computing when read buffer has been fulfilled walimis
2008-11-16 7:33 ` Ingo Molnar
2008-11-16 15:01 ` Steven Rostedt
2008-11-16 16:06 ` walimis
2008-11-18 14:36 ` Steven Rostedt
2008-11-18 15:17 ` walimis
2008-11-18 15:31 ` Steven Rostedt
2008-11-18 15:52 ` Ingo Molnar [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-11-14 17:40 walimis
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=20081118155252.GA2852@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=walimisdev@gmail.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