[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <157208043728.16551.14171894276497201932.stgit@devnote2>
Date: Sat, 26 Oct 2019 18:00:37 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
linux-kernel@...r.kernel.org
Subject: [BUGFIX PATCH V2 2/6] perf/probe: Fix to probe a function which has no entry pc
Fix perf probe to probe a function which has no entry pc or
low pc but only has ranges attribute.
probe_point_search_cb() uses dwarf_entrypc() to get the
probe address, but that doesn't work for the function DIE
which has only ranges attribute. Use die_entrypc() instead.
Without this fix,
# perf probe -D clear_tasks_mm_cpumask:0
Probe point 'clear_tasks_mm_cpumask' not found.
Error: Failed to add events.
With this,
# perf probe -D clear_tasks_mm_cpumask:0
p:probe/clear_tasks_mm_cpumask _text+632816
Reported-by: Arnaldo Carvalho de Melo <acme@...nel.org>
Fixes: e1ecbbc3fa83 ("perf probe: Fix to handle optimized not-inlined functions")
Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
---
tools/perf/util/probe-finder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 2b6513e5725c..71633f55f045 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -982,7 +982,7 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data)
param->retval = find_probe_point_by_line(pf);
} else if (die_is_func_instance(sp_die)) {
/* Instances always have the entry address */
- dwarf_entrypc(sp_die, &pf->addr);
+ die_entrypc(sp_die, &pf->addr);
/* But in some case the entry address is 0 */
if (pf->addr == 0) {
pr_debug("%s has no entry PC. Skipped\n",
Powered by blists - more mailing lists