]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.18.134/perf-unwind-unwind-with-libdw-doesn-t-take-symfs-int.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.18.134 / perf-unwind-unwind-with-libdw-doesn-t-take-symfs-int.patch
CommitLineData
10de2c4d
SL
1From 0529b472d53efb4868c72c2cc164051e1f9a6ce1 Mon Sep 17 00:00:00 2001
2From: Martin Vuille <jpmv27@aim.com>
3Date: Sun, 11 Feb 2018 16:24:20 -0500
4Subject: perf unwind: Unwind with libdw doesn't take symfs into account
5
6[ Upstream commit 3d20c6246690219881786de10d2dda93f616d0ac ]
7
8Path passed to libdw for unwinding doesn't include symfs path
9if specified, so unwinding fails because ELF file is not found.
10
11Similar to unwinding with libunwind, pass symsrc_filename instead
12of long_name. If there is no symsrc_filename, fallback to long_name.
13
14Signed-off-by: Martin Vuille <jpmv27@aim.com>
15Cc: Adrian Hunter <adrian.hunter@intel.com>
16Cc: David Ahern <dsahern@gmail.com>
17Cc: Jiri Olsa <jolsa@kernel.org>
18Cc: Namhyung Kim <namhyung@kernel.org>
19Cc: Wang Nan <wangnan0@huawei.com>
20Link: http://lkml.kernel.org/r/20180211212420.18388-1-jpmv27@aim.com
21Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
22Signed-off-by: Sasha Levin <sashal@kernel.org>
23---
7efe0254 24 tools/perf/util/unwind-libdw.c | 2 +-
10de2c4d
SL
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
10de2c4d
SL
27--- a/tools/perf/util/unwind-libdw.c
28+++ b/tools/perf/util/unwind-libdw.c
7efe0254 29@@ -47,7 +47,7 @@ static int __report_module(struct addr_l
10de2c4d
SL
30
31 if (!mod)
32 mod = dwfl_report_elf(ui->dwfl, dso->short_name,
33- dso->long_name, -1, al->map->start,
34+ (dso->symsrc_filename ? dso->symsrc_filename : dso->long_name), -1, al->map->start,
35 false);
36
37 return mod && dwfl_addrmodule(ui->dwfl, ip) == mod ? 0 : -1;