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: Linux Kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] ftrace: fix current_tracer error return
Date: Tue, 28 Oct 2008 20:55:57 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.1.10.0810282052300.26466@gandalf.stny.rr.com> (raw)
In-Reply-To: <c62985530810281734k578f1c2dka79ad045abb8bb93@mail.gmail.com>


On Wed, 29 Oct 2008, Fr?d?ric Weisbecker wrote:
> >
> > My test scripts automatically set or unset /proc/sys/kernel/ftrace_enabled
> >
> > I believe I wanted that to be default off when dynamic ftrace was not
> > active. Currently, it really shouldn't matter, because there's a check to
> > make sure that ftrace has a registered function before calling it.
> >
> > That was just my preference. But if you find it less confusing, then
> > having ftrace_enabled as default on even when dynamic ftrace is not
> > enabled, is fine with me.
> >
> > -- Steve
> >
> >
> 
> Thanks. I guess this bug was there for several days. But since I

But this was not a bug :-/

I believe I purposely set it that way. The bug was that you did not know 
that you could enable it with /proc/sys/kernel/ftrace_enabled ;-)


> always used dynamic ftrace, I've not
> seen it until yesterday. (BTW I didn't tested with dynamic since this
> patch). I had one other bug that made the set of
> function tracer blocking during the write on current_trace with
> dynamic ftrace. I will have a look on it.

Hmm, that could be a bug, but I do not know the details.

> 
> Actually one thing that makes me a bit confused is the use of these
> two vars: ftrace_enabled and ftrace_disabled.
> They are not used for the same purpose but their name suggest the same
> role.... :-)

Well, the code documents it pretty well:

/* ftrace_enabled is a method to turn ftrace on or off */
int ftrace_enabled __read_mostly;
static int last_ftrace_enabled;

/*
 * ftrace_disabled is set when an anomaly is discovered.
 * ftrace_disabled is much stronger than ftrace_enabled.
 */
static int ftrace_disabled __read_mostly;

-- Steve


  reply	other threads:[~2008-10-29  0:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27 23:18 Ftrace doesn't work anymore on latest tip 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
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 [this message]
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.0810282052300.26466@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [PATCH] ftrace: fix current_tracer error return' \
    /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).