Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303412

[PATCH 05/13] perf tools libdw: Check for mmaps also in MAP__VARIABLE tree

From Jiri Olsa <jolsa@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 05/13] perf tools libdw: Check for mmaps also in MAP__VARIABLE tree
Date 2016-01-07 10:20 +0100
Message-ID <qOeTF-65o-53@gated-at.bofh.it> (permalink)
References <qOeTE-65o-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


We've seen cases (softice) where DWARF unwinder went
through non executable mmaps, which we need to lookup
in MAP__VARIABLE tree.

Reported-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Link: http://lkml.kernel.org/n/tip-pd37evgxxggiu5sfomog8gtw@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/unwind-libdw.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

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,
 	thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
 			      MAP__FUNCTION, addr, &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, addr, &al);
+	}
+
+	if (!al.map) {
 		pr_debug("unwind: no map for %lx\n", (unsigned long)addr);
 		return -1;
 	}
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 05/13] perf tools libdw: Check for mmaps also in MAP__VARIABLE tree Jiri Olsa <jolsa@kernel.org> - 2016-01-07 10:20 +0100
  [tip:perf/core] perf libdw:   Check for mmaps also in MAP__VARIABLE tree tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-01-09 17:50 +0100

csiph-web