lkml.org 
[lkml]   [2008]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -tip FIXED] ftrace: add nop tracer
On Fri, Sep 19, 2008 at 11:16 PM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Steven Noonan <steven@uplinklabs.net> wrote:
>
>> On Fri, Sep 19, 2008 at 2:23 PM, Andrew Morton
>> <akpm@linux-foundation.org> wrote:
>> > On Fri, 19 Sep 2008 03:06:43 -0700
>> > Steven Noonan <steven@uplinklabs.net> wrote:
>> >
>> >> --- a/kernel/trace/trace.h
>> >> +++ b/kernel/trace/trace.h
>> >> @@ -339,6 +339,10 @@ extern int trace_selftest_startup_preemptirqsoff(struct tracer *trace,
>> >> extern int trace_selftest_startup_wakeup(struct tracer *trace,
>> >> struct trace_array *tr);
>> >> #endif
>> >> +#ifdef CONFIG_NOP_TRACER
>> >> +extern int trace_selftest_startup_nop(struct tracer *trace,
>> >> + struct trace_array *tr);
>> >> +#endif
>> >> #ifdef CONFIG_CONTEXT_SWITCH_TRACER
>> >> extern int trace_selftest_startup_sched_switch(struct tracer *trace,
>> >> struct trace_array *tr);
>> >
>> > Consider omitting the ifdefs around the declarations.
>> >
>> > pro: the code looks nicer and is less likely to suffer build errors
>> > with weird config combinations.
>> >
>> > con: build errors are reported at link-time rather than at compile-time.
>> >
>> > Personally, I think pro>con here.
>> >
>>
>> I merely based this on one of the other tracers, so the ifdefs are
>> basically copied and renamed.
>
> yeah. Feel free to send a separate patch that implements Andrew's
> clean-up suggestion. I agree that pro>con.
>

How about this patch gets applied to -tip and I submit one that drops
the ifdefs on this and the other tracers?


\
 
 \ /
  Last update: 2008-09-20 09:37    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site