From: tip-bot for Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, paulus@samba.org,
hpa@zytor.com, mingo@redhat.com, a.p.zijlstra@chello.nl,
fweisbec@gmail.com, masami.hiramatsu.pt@hitachi.com,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] perf probe: Fix return probe support
Date: Thu, 9 Sep 2010 19:43:36 GMT [thread overview]
Message-ID: <tip-04ddd04b044d8896a4f8a921b23ba09d365df196@git.kernel.org> (raw)
In-Reply-To: <20100827113852.22882.87447.stgit@ltc236.sdl.hitachi.co.jp>
Commit-ID: 04ddd04b044d8896a4f8a921b23ba09d365df196
Gitweb: http://git.kernel.org/tip/04ddd04b044d8896a4f8a921b23ba09d365df196
Author: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
AuthorDate: Fri, 27 Aug 2010 20:38:53 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 8 Sep 2010 11:47:18 -0300
perf probe: Fix return probe support
Fix a bug to support %return probe syntax again. Previous commit 4235b04 has a
bug which disables the %return syntax on perf probe.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20100827113852.22882.87447.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 1 +
tools/perf/util/probe-finder.c | 10 ++++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index e72f05c..fcc16e4 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1539,6 +1539,7 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
goto error;
}
tev->point.offset = pev->point.offset;
+ tev->point.retprobe = pev->point.retprobe;
tev->nargs = pev->nargs;
if (tev->nargs) {
tev->args = zalloc(sizeof(struct probe_trace_arg)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 5251366..9b0e1b1 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -783,6 +783,16 @@ static int convert_probe_point(Dwarf_Die *sp_die, struct probe_finder *pf)
/* This function has no name. */
tev->point.offset = (unsigned long)pf->addr;
+ /* Return probe must be on the head of a subprogram */
+ if (pf->pev->point.retprobe) {
+ if (tev->point.offset != 0) {
+ pr_warning("Return probe must be on the head of"
+ " a real function\n");
+ return -EINVAL;
+ }
+ tev->point.retprobe = true;
+ }
+
pr_debug("Probe point found: %s+%lu\n", tev->point.symbol,
tev->point.offset);
next prev parent reply other threads:[~2010-09-09 19:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 11:38 [PATCH -tip 0/5] Perf and tracing/kprobe fixes Masami Hiramatsu
2010-08-27 11:38 ` [PATCH -tip 1/5] tracing/kprobe: Fix a memory leak in error case Masami Hiramatsu
2010-09-09 19:43 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-08-27 11:38 ` [PATCH -tip 2/5] perf probe: Fix return probe support Masami Hiramatsu
2010-09-09 19:43 ` tip-bot for Masami Hiramatsu [this message]
2010-08-27 11:38 ` [PATCH -tip 3/5] perf probe: Don't make argument names from raw parameters Masami Hiramatsu
2010-09-09 19:43 ` [tip:perf/core] perf probe: Fix handling of arguments names tip-bot for Masami Hiramatsu
2010-08-27 11:39 ` [PATCH -tip 4/5] tracing/kprobes: Set a name for each argument automatically Masami Hiramatsu
2010-09-09 19:44 ` [tip:perf/core] tracing/kprobes: Fix handling of argument names tip-bot for Masami Hiramatsu
2010-08-27 11:39 ` [PATCH -tip 5/5] tracing/kprobe: Check invalid argument name Masami Hiramatsu
2010-09-09 19:44 ` [tip:perf/core] tracing/kprobe: Fix handling of C-unlike argument names tip-bot for Masami Hiramatsu
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-04ddd04b044d8896a4f8a921b23ba09d365df196@git.kernel.org \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.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=paulus@samba.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
Powered by JetHome