From: Pekka Paalanen <pq@iki.fi>
To: "Frédéric Weisbecker" <fweisbec@gmail.com>,
"Steven Rostedt" <rostedt@goodmis.org>
Cc: "Ingo Molnar" <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: [Patch -tip 1/3] Tracing/ftrace: Relay unhandled entry output
Date: Thu, 25 Sep 2008 18:49:19 +0300 [thread overview]
Message-ID: <20080925184919.016d8957@daedalus.pq.iki.fi> (raw)
In-Reply-To: <c62985530809250833x2468f07an547a82eaa1329d9@mail.gmail.com>
On Thu, 25 Sep 2008 17:33:02 +0200
"Frédéric Weisbecker" <fweisbec@gmail.com> wrote:
> 2008/9/25 Pekka Paalanen <pq@iki.fi>:
> > IMHO this breaks the trace_seq handling. trace_seq may contain
> > the output of several entries, as far as they fit in it as a whole.
> > E.g. trace_seq_printf() does not print partial lines but returns 0,
> > so that the entry is not consumed right now. The user space reader
> > must consume trace_seq content, before trace_seq_printf()
> > is attempted again, hopefully with enough space in trace_seq to
> > succeed. See tracing_read_pipe().
> > print_line() callback works the same way. Returning 0 means "could
> > not print it this time, call me back later". You can't use that to
> > say "use the default output function instead". Note, that possibly
> > the default output function will fail, too, so it could actually
> > try many of the default output functions and still fail, eventually
> > leading by luck to the correct behaviour in most cases.
> > Note, that mmiotrace follows this convention: it deliberatly
> > returns 1 without processing when it wants the entry discarded, and
> > it returns 0 when there was not enough space to process the entry.
> > This is explained in my other email.
>
> Hmm you're right. I didn't thought about the partial line which must
> not be printed.
> The problem is that with this convention, 0 means two things: "I will
> handle this entry
> later" or "I can't handle it".
> But if you return 0 because you can't handle it, and if the current
> len of the seq is 0, the
> pipe will be broken.
My understanding is that the pipe will be broken only, if the trace
framework believes tracing is disabled. Recall the discussion about
tracer_enabled = 0. Which is a bug, and I hoped Steven would have
commented on how to fix that properly.
Or was it fixed already, and this is a different issue?
I didn't notice.
--
Pekka Paalanen
http://www.iki.fi/pq/
next prev parent reply other threads:[~2008-09-25 15:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 12:19 Frédéric Weisbecker
2008-09-25 12:38 ` Ingo Molnar
2008-09-25 14:56 ` Frédéric Weisbecker
2008-09-25 15:09 ` Pekka Paalanen
2008-09-25 15:33 ` Frédéric Weisbecker
2008-09-25 15:49 ` Pekka Paalanen [this message]
2008-09-25 15:56 ` Frédéric Weisbecker
2008-09-25 16:01 ` Pekka Paalanen
2008-09-25 16:40 ` Frédéric Weisbecker
2008-09-27 17:50 ` Ingo Molnar
2008-09-29 9:29 ` Frédéric Weisbecker
2008-09-27 17:53 ` Ingo Molnar
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=20080925184919.016d8957@daedalus.pq.iki.fi \
--to=pq@iki.fi \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®