summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2022-12-15 11:28:12 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-12-21 14:52:40 -0300
commit3b27222dd6cf7578c35b5903bf9d183a88d13744 (patch)
tree4b2218605e137f86d2134bb80faeb62f3430dd0b /tools
parent06ea72a42d96ddcbac53f3b08a1c56d13b1c014a (diff)
perf srcline: Skip srcline if .debug_line is missing
The srcline info is from the .debug_line section. No need to setup addr2line subprocess if the section is missing. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20221215192817.2734573-5-namhyung@kernel.org Cc: Peter Zijlstra <peterz@infradead.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Andi Kleen <ak@linux.intel.com> Cc: LKML <linux-kernel@vger.kernel.org> Cc: linux-perf-users@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/srcline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index 5319efb16a5a..2c212e2e1b65 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -550,6 +550,9 @@ static int addr2line(const char *dso_name, u64 addr,
size_t inline_count = 0;
if (!a2l) {
+ if (!filename__has_section(dso_name, ".debug_line"))
+ goto out;
+
dso->a2l = addr2line_subprocess_init(dso_name);
a2l = dso->a2l;
}