aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-01-07 04:14:01 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-01-08 12:16:34 -0500
commit0ddf5246f70ecc04e1bb4c4dc2be65977d1c03a7 (patch)
tree1b11f0001dbcadbb977fc06eb6223d38536c7fe9
parentf22ed827a8d5ff5a85e7c8e865baaaaf71a8d0cc (diff)
perf unwind: 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-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/unwind-libunwind.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index f37859c04317..ee7e372297e5 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -319,6 +319,15 @@ static struct map *find_map(unw_word_t ip, struct unwind_info *ui)
319 319
320 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER, 320 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
321 MAP__FUNCTION, ip, &al); 321 MAP__FUNCTION, ip, &al);
322 if (!al.map) {
323 /*
324 * We've seen cases (softice) where DWARF unwinder went
325 * through non executable mmaps, which we need to lookup
326 * in MAP__VARIABLE tree.
327 */
328 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
329 MAP__VARIABLE, ip, &al);
330 }
322 return al.map; 331 return al.map;
323} 332}
324 333