LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Frédéric Weisbecker" <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Ftrace doesn't work anymore on latest tip
Date: Tue, 28 Oct 2008 10:23:09 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.1.10.0810281015260.29482@gandalf.stny.rr.com> (raw)
In-Reply-To: <c62985530810280202r694a23e8l5233d892b3aa4330@mail.gmail.com>
On Tue, 28 Oct 2008, Fr?d?ric Weisbecker wrote:
> 2008/10/28 Fr?d?ric Weisbecker <fweisbec@gmail.com>:
> > 2008/10/28 Steven Rostedt <rostedt@goodmis.org>:
> >>
> >> On Tue, 28 Oct 2008, Fr?d?ric Weisbecker wrote:
> >>
> >>> Hi,
> >>>
> >>> I tried to launch the function tracer with the latest -tip.
> >>> With DYNAMIC_FTRACE (I just tried one time), I set "function" to
> >>> current_trace and it blocks during writing. I can't
> >>> even switch to another console.
> >>> Without DYNAMIC_FTRACE I can set the tracer to function but it doesn't
> >>> produce any trace, even on trace or tracing_pipe.
> >>>
> >>> My config is in attachment.
> >>> I will try some revert...or some other tracers.
I've tried this with and without dynamic ftrace and can not reproduce.
> >>>
> >>
> >>
> >> You might want to update your config (make oldconfig?) The latest tip has
> >> FUNCTION_TRACER instead of FTRACE.
> >>
> >> Also, the config you sent me, does not even have FTRACE on :-/
> >>
> >> CONFIG_HAVE_FTRACE=y
> >> CONFIG_HAVE_DYNAMIC_FTRACE=y
> >> CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
> >> CONFIG_TRACER_MAX_TRACE=y
> >> CONFIG_RING_BUFFER=y
> >> CONFIG_TRACING=y
> >> # CONFIG_FTRACE is not set
> >> # CONFIG_IRQSOFF_TRACER is not set
> >> # CONFIG_PREEMPT_TRACER is not set
> >> # CONFIG_SYSPROF_TRACER is not set
> >> CONFIG_SCHED_TRACER=y
> >> CONFIG_CONTEXT_SWITCH_TRACER=y
> >
> > Sorry I sent a config for the mainline.
> > This new one is the right.
> >
>
> One other point: I can't assign the sched_switch tracer.
I found the cause of this. It was:
c2931e05ec5965597cbfb79ad332d4a29aeceb23
ftrace: return an error when setting a nonexistent tracer
Because the write of sched_switch has more charachters than the max
(because of the whitespace at the end), then we chop what we read from
userspace. Since we do not cosume all what was written, the 'echo' writes
the rest again. But this time it's just the whitespace. This fails to
match, even though we did match before. And we return -EINVAL. But the
funny part is that you can cat the file again, you will see that it
succeeded!
I'll write a patch to fix this.
-- Steve
> echo sched_switch > current_tracer returns -EINVAL with
> CONFIG_DYNAMIC_FTRACE disabled (didn't tested with enabled).
>
> I will check that more deeper when I'll have more time.
>
>
next prev parent reply other threads:[~2008-10-28 20:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 23:18 Frédéric Weisbecker
2008-10-27 23:36 ` Steven Rostedt
2008-10-27 23:44 ` Frédéric Weisbecker
2008-10-28 9:02 ` Frédéric Weisbecker
2008-10-28 14:23 ` Steven Rostedt [this message]
2008-10-28 14:44 ` [PATCH] ftrace: fix current_tracer error return Steven Rostedt
2008-10-28 15:35 ` Frédéric Weisbecker
2008-10-28 15:41 ` Steven Rostedt
2008-10-28 18:15 ` Frédéric Weisbecker
2008-10-28 18:32 ` Steven Rostedt
2008-10-29 0:34 ` Frédéric Weisbecker
2008-10-29 0:55 ` Steven Rostedt
2008-10-29 1:09 ` Frédéric Weisbecker
2008-10-29 1:11 ` Steven Rostedt
2008-10-29 8:35 ` 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=alpine.DEB.1.10.0810281015260.29482@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--subject='Re: Ftrace doesn'\''t work anymore on latest tip' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).