diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2010-08-27 07:38:53 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-09-08 10:47:18 -0400 |
commit | 04ddd04b044d8896a4f8a921b23ba09d365df196 (patch) | |
tree | 9b0068acdfe3c5d27e7f573b35018ea77e78d18e /tools/perf/util/probe-finder.c | |
parent | 61a527362234ac3352a91ac67c50c6f7cd248eb1 (diff) |
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>
Diffstat (limited to 'tools/perf/util/probe-finder.c')
-rw-r--r-- | tools/perf/util/probe-finder.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 525136684d4e..9b0e1b1f9755 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) | |||
783 | /* This function has no name. */ | 783 | /* This function has no name. */ |
784 | tev->point.offset = (unsigned long)pf->addr; | 784 | tev->point.offset = (unsigned long)pf->addr; |
785 | 785 | ||
786 | /* Return probe must be on the head of a subprogram */ | ||
787 | if (pf->pev->point.retprobe) { | ||
788 | if (tev->point.offset != 0) { | ||
789 | pr_warning("Return probe must be on the head of" | ||
790 | " a real function\n"); | ||
791 | return -EINVAL; | ||
792 | } | ||
793 | tev->point.retprobe = true; | ||
794 | } | ||
795 | |||
786 | pr_debug("Probe point found: %s+%lu\n", tev->point.symbol, | 796 | pr_debug("Probe point found: %s+%lu\n", tev->point.symbol, |
787 | tev->point.offset); | 797 | tev->point.offset); |
788 | 798 | ||