[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-0ba98149f8c8b6b2ba36be9938afb731fa719004@git.kernel.org>
Date: Sat, 9 Jan 2016 08:41:58 -0800
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: adrian.hunter@...el.com, tglx@...utronix.de, noelgrandin@...il.com,
mingo@...nel.org, namhyung@...nel.org, jolsa@...nel.org,
dsahern@...il.com, hpa@...or.com, a.p.zijlstra@...llo.nl,
acme@...hat.com, linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf libdw:
Check for mmaps also in MAP__VARIABLE tree
Commit-ID: 0ba98149f8c8b6b2ba36be9938afb731fa719004
Gitweb: http://git.kernel.org/tip/0ba98149f8c8b6b2ba36be9938afb731fa719004
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Thu, 7 Jan 2016 10:14:02 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 8 Jan 2016 14:16:57 -0300
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@...il.com>
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1452158050-28061-6-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
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 db8142b..cf5e250 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;
}
Powered by blists - more mailing lists