From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
rostedt@goodmis.org, chris.mason@oracle.com, tglx@linutronix.de,
mingo@elte.hu
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:perfcounters/urgent] ftrace: Fix perf-tracepoint OOPS
Date: Thu, 06 Aug 2009 11:11:50 +0200 [thread overview]
Message-ID: <1249549910.32113.70.camel@twins> (raw)
In-Reply-To: <tip-af6af30c0fcd77e621638e53ef8b176bca8bd3b4@git.kernel.org>
> [ v2: fix build error in the !CONFIG_EVENT_PROFILE case ]
> Signed-off-by: Ingo Molnar <mingo@elte.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 ;-)
next prev parent reply other threads:[~2009-08-06 9:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 18:41 [PATCH] ftrace: fix perf-tracepoint OOPS Peter Zijlstra
2009-08-05 18:48 ` [tip:perfcounters/urgent] ftrace: Fix " tip-bot for Peter Zijlstra
2009-08-05 18:53 ` [PATCH] ftrace: fix " Steven Rostedt
2009-08-05 19:23 ` [PATCH] perf: Don't list tracepoints without an id Peter Zijlstra
2009-08-05 20:07 ` Jason Baron
2009-08-06 14:48 ` [PATCH -v2] " Peter Zijlstra
2009-08-06 19:33 ` Jason Baron
2009-08-07 11:12 ` [tip:perfcounters/urgent] " tip-bot for Peter Zijlstra
2009-08-06 4:27 ` [tip:perfcounters/urgent] ftrace: Fix perf-tracepoint OOPS tip-bot for Peter Zijlstra
2009-08-06 9:11 ` Peter Zijlstra [this message]
2009-08-06 12:38 ` 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=1249549910.32113.70.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=chris.mason@oracle.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox