lkml.org 
[lkml]   [2022]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/9] perf srcline: Skip srcline if .debug_line is missing
Date
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>
---
tools/perf/util/srcline.c | 3 +++
1 file changed, 3 insertions(+)

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;
}
--
2.39.0.314.g84b9a713c41-goog
\
 
 \ /
  Last update: 2022-12-15 20:29    [W:0.189 / U:3.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site