[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1469084947-14567-1-git-send-email-uwe@kleine-koenig.org>
Date: Thu, 21 Jul 2016 09:09:07 +0200
From: Uwe Kleine-König <uwe@...ine-koenig.org>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: kernel@...gutronix.de,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Subject: [PATCH] perf symbols: Fix reading build id
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
When is_regular_file(name) is called name points to a freshly allocated
and uninitialized chunk of memory, so is_regular_file(name) is usually
false and reading build id is skipped which makes it impossible to
find debug infos when a build id based system is in use.
Fixes: 403567217d3f ("perf symbols: Do not read symbols/data from device files")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
tools/perf/util/symbol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 54c4ff2b1cee..7044742c828f 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1430,7 +1430,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
* Read the build id if possible. This is required for
* DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work
*/
- if (is_regular_file(name) &&
+ if (is_regular_file(dso->long_name) &&
filename__read_build_id(dso->long_name, build_id, BUILD_ID_SIZE) > 0)
dso__set_build_id(dso, build_id);
--
2.8.1
Powered by blists - more mailing lists