[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090806123829.GE15314@elte.hu>
Date: Thu, 6 Aug 2009 14:38:29 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
rostedt@...dmis.org, chris.mason@...cle.com, tglx@...utronix.de,
linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perfcounters/urgent] ftrace: Fix perf-tracepoint OOPS
* Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
>
> > [ v2: fix build error in the !CONFIG_EVENT_PROFILE case ]
> > Signed-off-by: Ingo Molnar <mingo@...e.hu>
> >
> >
> > ---
> > include/linux/ftrace_event.h | 8 +++-----
> > kernel/trace/trace_event_profile.c | 2 +-
> > kernel/trace/trace_events.c | 2 +-
> > 3 files changed, 5 insertions(+), 7 deletions(-)
> >
> > diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
> > index 5c093ff..d7cd193 100644
> > --- a/include/linux/ftrace_event.h
> > +++ b/include/linux/ftrace_event.h
> > @@ -119,11 +119,9 @@ struct ftrace_event_call {
> > void *filter;
> > void *mod;
> >
> > -#ifdef CONFIG_EVENT_PROFILE
> > - atomic_t profile_count;
> > - int (*profile_enable)(struct ftrace_event_call *);
> > - void (*profile_disable)(struct ftrace_event_call *);
> > -#endif
> > + atomic_t profile_count;
> > + int (*profile_enable)(struct ftrace_event_call *);
> > + void (*profile_disable)(struct ftrace_event_call *);
> > };
>
> Ah, I would have added ifdefs around the below bit.
>
> > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> > index 23d2972..e75276a 100644
> > --- a/kernel/trace/trace_events.c
> > +++ b/kernel/trace/trace_events.c
> > @@ -940,7 +940,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
> > entry = trace_create_file("enable", 0644, call->dir, call,
> > enable);
> >
> > - if (call->id)
> #ifdef CONFIG_EVENT_PROFILE
> > + if (call->id && call->profile_enable)
> > entry = trace_create_file("id", 0444, call->dir, call,
> > id);
> #endif
>
> Like that, but I guess this works too ;-)
i think CONFIG_EVENT_PROFILE should go away - it's clearly a core
functionality of ftrace. Whenever we hit a Kconfig induced build
breakage we should first consider reducing the Kconfig complexity a
bit.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists