Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ddf5246 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarNoel Grandin <noelgrandin@gmail.com>
Signed-off-by: default avatarJiri 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f22ed827
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -319,6 +319,15 @@ static struct map *find_map(unw_word_t ip, struct unwind_info *ui)


	thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
	thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
			      MAP__FUNCTION, ip, &al);
			      MAP__FUNCTION, ip, &al);
	if (!al.map) {
		/*
		 * We've seen cases (softice) where DWARF unwinder went
		 * through non executable mmaps, which we need to lookup
		 * in MAP__VARIABLE tree.
		 */
		thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
				      MAP__VARIABLE, ip, &al);
	}
	return al.map;
	return al.map;
}
}