aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/probe-event.c1
-rw-r--r--tools/perf/util/probe-finder.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index e72f05c3bef0..fcc16e4349df 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,
1539 goto error; 1539 goto error;
1540 } 1540 }
1541 tev->point.offset = pev->point.offset; 1541 tev->point.offset = pev->point.offset;
1542 tev->point.retprobe = pev->point.retprobe;
1542 tev->nargs = pev->nargs; 1543 tev->nargs = pev->nargs;
1543 if (tev->nargs) { 1544 if (tev->nargs) {
1544 tev->args = zalloc(sizeof(struct probe_trace_arg) 1545 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 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