mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Pekka Paalanen" <pq@iki.fi>
Cc: "Steven Rostedt" <rostedt@goodmis.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Ingo Molnar" <mingo@elte.hu>
Subject: Re: Tracing framework regressions in 2.6.28-rc2
Date: Sun, 2 Nov 2008 17:52:02 +0100	[thread overview]
Message-ID: <c62985530811020852q1807ddc7ide08bac3630d9ff@mail.gmail.com> (raw)
In-Reply-To: <20081102183534.1bdc6779@daedalus.pq.iki.fi>

Hi Pekka!

2008/11/2 Pekka Paalanen <pq@iki.fi>:
> Hi all,
>
> I finally had the time to check how mmiotrace works in 2.6.28-rc2.
> On the first try I didn't find any mmiotrace problems, I traced the
> Nouveau DRM driver just fine, but the file /debug/tracing/current_tracer
> has started to misbehave.
>
> I think it is due to this patch:
>
> commit c2931e05ec5965597cbfb79ad332d4a29aeceb23
> Author: Frederic Weisbecker <fweisbec@gmail.com>
> Date:   Sat Oct 4 22:04:44 2008 +0200
>
>    ftrace: return an error when setting a nonexistent tracer
>
>    When one try to set a nonexistent tracer, no error is returned
>    as if the name of the tracer was correct.
>    We should return -EINVAL.
>
>    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
>    Acked-by: Steven Rostedt <srostedt@redhat.com>
>    Signed-off-by: Ingo Molnar <mingo@elte.hu>
>
> Now, whatever I echo to current_tracer, I get EINVAL.
> What's more confusing, if I do
> echo mmiotrace > /debug/tracing/current_tracer
> then I see the EINVAL error *and* mmiotrace is activated!
>
> The problem is with newlines, with 'echo -n' it works as it should.
>
> I'm starting to think the patch itself is fine, but it exposes an
> assumption in the write fop: a single write call contains all the
> data. I suspect there are actually two write calls in case of 'echo':
> one with 'mmiotrace' and one with '\n'. I don't see how else I could
> get the behaviour I get.


A patch has been applied for this in the mainline, the issue will be
fixed for rc3:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=60063a66236c15f5613f91390631e06718689782

> Another issue is the disappeared 'none' pseudo-tracer, which seems
> to be replaced with the 'nop' real tracer. Is using 'nop' now equivalent
> to the previous 'none' tracer?

Yes. A nop tracer has been released to have a kind of pattern to write
new tracers, and to have a tracer that does
nothing but is able to show user marks for example.
Since it does nothing, we replaced the none tracer by this one.

> I mean, when the 'nop' tracer is current, are all tracing calls no-ops and
> nothing will ever get into the ring buffer?
> I have to update the mmiotrace documentation about disabling tracing.

Hhm not really, you can receive pseudo entries like user marks. But
you can disable all the tracing by setting 0 to
tracing_enabled.

  reply	other threads:[~2008-11-02 16:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-02 16:35 Pekka Paalanen
2008-11-02 16:52 ` Frédéric Weisbecker [this message]
2008-11-02 17:17   ` Pekka Paalanen
2008-11-09 10:13 ` Tracing framework regression in 2.6.28-rc3 Pekka Paalanen
2008-11-09 14:14   ` 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=c62985530811020852q1807ddc7ide08bac3630d9ff@mail.gmail.com \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pq@iki.fi \
    --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®