Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiri Olsa and committed by
Arnaldo Carvalho de Melo
0ddf5246 f22ed827

+9
+9
tools/perf/util/unwind-libunwind.c
··· 319 319 320 320 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER, 321 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 331 return al.map; 323 332 } 324 333