From: Frederic Weisbecker <fweisbec@gmail.com>
To: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
lkml <linux-kernel@vger.kernel.org>,
systemtap <systemtap@sources.redhat.com>,
DLE <dle-develop@lists.sourceforge.net>,
Jim Keniston <jkenisto@us.ibm.com>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Andi Kleen <ak@linux.intel.com>,
Christoph Hellwig <hch@infradead.org>,
"Frank Ch. Eigler" <fche@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>, Jason Baron <jbaron@redhat.com>,
"K.Prasad" <prasad@linux.vnet.ibm.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Li Zefan <lizf@cn.fujitsu.com>,
Peter Zijlstra <peterz@infradead.org>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Tom Zanussi <tzanussi@gmail.com>
Subject: Re: [PATCH tracing/kprobes 3/3] tracing/ftrace: Fix to check create_event_dir() when adding new events
Date: Sat, 3 Oct 2009 02:56:49 +0200 [thread overview]
Message-ID: <20091003005647.GA4828@nowhere> (raw)
In-Reply-To: <20090925182054.10157.55219.stgit@omoto>
On Fri, Sep 25, 2009 at 11:20:54AM -0700, Masami Hiramatsu wrote:
> Check result of create_event_dir() and add ftrace_event_call to
> ftrace_events list only if it is succeeded. Thanks Li for pointing it out.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Jim Keniston <jkenisto@us.ibm.com>
> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: Christoph Hellwig <hch@infradead.org>
> Cc: Frank Ch. Eigler <fche@redhat.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Jason Baron <jbaron@redhat.com>
> Cc: K.Prasad <prasad@linux.vnet.ibm.com>
> Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
> Cc: Li Zefan <lizf@cn.fujitsu.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> Cc: Tom Zanussi <tzanussi@gmail.com>
> ---
>
> kernel/trace/trace_events.c | 29 +++++++++++++++++++++--------
> 1 files changed, 21 insertions(+), 8 deletions(-)
>
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index a4b7c9a..f03cda3 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -957,12 +957,14 @@ static int __trace_add_event_call(struct ftrace_event_call *call)
> if (!d_events)
> return -ENOENT;
>
> - list_add(&call->list, &ftrace_events);
> ret = event_create_dir(call, d_events, &ftrace_event_id_fops,
> &ftrace_enable_fops, &ftrace_event_filter_fops,
> &ftrace_event_format_fops);
> if (ret < 0)
> - list_del(&call->list);
> + pr_warning("Could not create directory of trace events/%s\n",
> + call->name);
We already have such warnings in event_create_dir, with even more granularity
against the failure reason. The patch is fine, but I'll just remove the warning
introduced inside while applying it.
Thanks.
PS: Also I guess we could add the event in the list right from
event_create_dir()...
next prev parent reply other threads:[~2009-10-03 0:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-25 18:19 [PATCH tracing/kprobes 0/3] tracing/kprobes: kprobe-tracer updates Masami Hiramatsu
2009-09-25 18:20 ` [PATCH tracing/kprobes 1/3] tracing/kprobes: Use global event profile buffer in kprobe tracer Masami Hiramatsu
2009-10-17 10:02 ` [tip:perf/probes] tracing/kprobes: Use global event perf buffers " tip-bot for Masami Hiramatsu
2009-09-25 18:20 ` [PATCH tracing/kprobes 2/3] x86: Add VIA processor instructions Masami Hiramatsu
2009-10-17 10:02 ` [tip:perf/probes] x86: Add VIA processor instructions in opcodes decoder tip-bot for Masami Hiramatsu
2009-09-25 18:20 ` [PATCH tracing/kprobes 3/3] tracing/ftrace: Fix to check create_event_dir() when adding new events Masami Hiramatsu
2009-10-03 0:56 ` Frederic Weisbecker [this message]
2009-10-17 10:02 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-09-26 9:08 ` [PATCH tracing/kprobes 0/3] tracing/kprobes: kprobe-tracer updates Steven Rostedt
2009-10-03 0:57 ` Frederic Weisbecker
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=20091003005647.GA4828@nowhere \
--to=fweisbec@gmail.com \
--cc=ak@linux.intel.com \
--cc=ananth@in.ibm.com \
--cc=dle-develop@lists.sourceforge.net \
--cc=fche@redhat.com \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=jbaron@redhat.com \
--cc=jkenisto@us.ibm.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=prasad@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=systemtap@sources.redhat.com \
--cc=tzanussi@gmail.com \
/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