From: tip-bot for Masami Hiramatsu <mhiramat@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@redhat.com, peterz@infradead.org, fweisbec@gmail.com,
rostedt@goodmis.org, jbaron@redhat.com, tglx@linutronix.de,
mhiramat@redhat.com, hpa@zytor.com, fche@redhat.com,
linux-kernel@vger.kernel.org, jkenisto@us.ibm.com,
hch@infradead.org, ananth@in.ibm.com, srikar@linux.vnet.ibm.com,
prasad@linux.vnet.ibm.com, mingo@elte.hu
Subject: [tip:perf/probes] kprobe-tracer: Compare both of event-name and event-group to find probe
Date: Thu, 29 Oct 2009 08:08:20 GMT [thread overview]
Message-ID: <tip-dd004c475cd15a5749b04b0283d41ffdfa57d658@git.kernel.org> (raw)
In-Reply-To: <20091027204244.30545.27516.stgit@harusame>
Commit-ID: dd004c475cd15a5749b04b0283d41ffdfa57d658
Gitweb: http://git.kernel.org/tip/dd004c475cd15a5749b04b0283d41ffdfa57d658
Author: Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Tue, 27 Oct 2009 16:42:44 -0400
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 29 Oct 2009 08:47:47 +0100
kprobe-tracer: Compare both of event-name and event-group to find probe
Fix find_probe_event() to compare both of event-name and
event-group. Without this fix, kprobe-tracer overwrites existing
same event-name probe even if its group-name is different.
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: Christoph Hellwig <hch@infradead.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
LKML-Reference: <20091027204244.30545.27516.stgit@harusame>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/trace/trace_kprobe.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index b8ef707..a86c3ac 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -353,12 +353,14 @@ static void free_trace_probe(struct trace_probe *tp)
kfree(tp);
}
-static struct trace_probe *find_probe_event(const char *event)
+static struct trace_probe *find_probe_event(const char *event,
+ const char *group)
{
struct trace_probe *tp;
list_for_each_entry(tp, &probe_list, list)
- if (!strcmp(tp->call.name, event))
+ if (strcmp(tp->call.name, event) == 0 &&
+ strcmp(tp->call.system, group) == 0)
return tp;
return NULL;
}
@@ -383,7 +385,7 @@ static int register_trace_probe(struct trace_probe *tp)
mutex_lock(&probe_lock);
/* register as an event */
- old_tp = find_probe_event(tp->call.name);
+ old_tp = find_probe_event(tp->call.name, tp->call.system);
if (old_tp) {
/* delete old event */
unregister_trace_probe(old_tp);
next prev parent reply other threads:[~2009-10-29 8:09 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 20:41 [PATCH -tip perf/probes 00/10] x86 insn decoder bugfixes Masami Hiramatsu
2009-10-27 20:42 ` [PATCH -tip perf/probes 01/10] x86: Fix SSE opcode map bug Masami Hiramatsu
2009-10-29 8:06 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-27 20:42 ` [PATCH -tip perf/probes 02/10] x86: Merge INAT_REXPFX into INAT_PFX_* Masami Hiramatsu
2009-10-29 8:07 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-27 20:42 ` [PATCH -tip perf/probes 03/10] x86: Add pclmulq to x86 opcode map Masami Hiramatsu
2009-10-29 8:07 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-27 20:42 ` [PATCH -tip perf/probes 04/10] x86: AVX instruction set decoder support Masami Hiramatsu
2009-10-29 8:07 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-27 20:42 ` [PATCH -tip perf/probes 05/10] x86: Add Intel FMA instructions to x86 opcode map Masami Hiramatsu
2009-10-29 8:08 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-27 20:42 ` [PATCH -tip perf/probes 06/10] kprobe-tracer: Compare both of event-name and event-group to find probe Masami Hiramatsu
2009-10-29 8:08 ` tip-bot for Masami Hiramatsu [this message]
2009-10-27 20:42 ` [PATCH -tip perf/probes 07/10] perf/probes: Exit searching after finding target function Masami Hiramatsu
2009-10-29 8:08 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-27 20:43 ` [PATCH -tip perf/probes 08/10] perf/probes: Change command-line option of perf-probe Masami Hiramatsu
2009-10-29 8:08 ` [tip:perf/probes] perf/probes: Improve " tip-bot for Masami Hiramatsu
2009-10-27 20:43 ` [PATCH -tip perf/probes 09/10] perf/probes: Change probepoint syntax " Masami Hiramatsu
2009-10-29 8:09 ` [tip:perf/probes] perf/probes: Improve probe point " tip-bot for Masami Hiramatsu
2009-10-27 20:43 ` [PATCH -tip perf/probes 10/10] perf/probes: Support function entry relative line number Masami Hiramatsu
2009-10-29 8:09 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-29 8:53 ` [PATCH -tip perf/probes 00/10] x86 insn decoder bugfixes Ingo Molnar
2009-10-29 15:10 ` Arnaldo Carvalho de Melo
2009-10-29 16:55 ` Masami Hiramatsu
2009-10-29 20:10 ` Masami Hiramatsu
2009-10-29 20:25 ` Josh Stone
2009-10-29 20:41 ` Masami Hiramatsu
2009-11-02 21:16 ` [PATCH -tip perf/probes 00/10] x86 insn decoder bugfixes and perf-probe syntax changes Masami Hiramatsu
2009-11-02 21:26 ` Frederic Weisbecker
2009-11-02 21:56 ` Masami Hiramatsu
2009-11-03 0:36 ` Masami Hiramatsu
2009-11-03 7:32 ` Ingo Molnar
2009-11-03 15:07 ` Masami Hiramatsu
2009-10-29 17:15 ` [PATCH -tip perf/probes 00/10] x86 insn decoder bugfixes Frank Ch. Eigler
2009-10-29 19:18 ` Roland McGrath
2009-11-03 7:24 ` Ingo Molnar
2009-11-03 12:35 ` Using build-ids in perf tools was " Arnaldo Carvalho de Melo
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=tip-dd004c475cd15a5749b04b0283d41ffdfa57d658@git.kernel.org \
--to=mhiramat@redhat.com \
--cc=ananth@in.ibm.com \
--cc=fche@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=jbaron@redhat.com \
--cc=jkenisto@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=prasad@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--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