lkml.org 
[lkml]   [2008]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ftrace: fix current_tracer error return
2008/10/29 Steven Rostedt <rostedt@goodmis.org>:
>
> 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 ;-)

Ah ok. I better understand now.
But IMHO I guess that would better for developpers who will use
it to have something directly enabled whithout touching this file at each start.

>
>> 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;

Oops... I missed it.


\
 
 \ /
  Last update: 2008-10-29 02:11    [W:0.080 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site