aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-01-07 04:14:02 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-01-08 12:16:57 -0500
commit0ba98149f8c8b6b2ba36be9938afb731fa719004 (patch)
tree8244c888b8b9a839810d35f96dcad2cbf12575e7
parent0ddf5246f70ecc04e1bb4c4dc2be65977d1c03a7 (diff)
perf libdw: Check for mmaps also in MAP__VARIABLE tree
We've seen cases (softice) where DWARF unwinder went through non executable mmaps, which we need to lookup in MAP__VARIABLE tree. Reported-and-Tested-by: Noel Grandin <noelgrandin@gmail.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1452158050-28061-6-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/unwind-libdw.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c
index db8142ba7cb9..cf5e250bc78e 100644
--- a/tools/perf/util/unwind-libdw.c
+++ b/tools/perf/util/unwind-libdw.c
@@ -96,6 +96,16 @@ static int access_dso_mem(struct unwind_info *ui, Dwarf_Addr addr,
96 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER, 96 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
97 MAP__FUNCTION, addr, &al); 97 MAP__FUNCTION, addr, &al);
98 if (!al.map) { 98 if (!al.map) {
99 /*
100 * We've seen cases (softice) where DWARF unwinder went
101 * through non executable mmaps, which we need to lookup
102 * in MAP__VARIABLE tree.
103 */
104 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
105 MAP__VARIABLE, addr, &al);
106 }
107
108 if (!al.map) {
99 pr_debug("unwind: no map for %lx\n", (unsigned long)addr); 109 pr_debug("unwind: no map for %lx\n", (unsigned long)addr);
100 return -1; 110 return -1;
101 } 111 }