Browse Source

perf symbols: Fix reading of build-id from vDSO

We need to use the long name (the filename) when reading the build-id
from a DSO.  Using the short name doesn't work for (at least) vDSOs.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20160113172301.GT28542@decadent.org.uk
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Ben Hutchings 9 years ago
parent
commit
40c4a0f92a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/perf/util/symbol.c

+ 1 - 1
tools/perf/util/symbol.c

@@ -1466,7 +1466,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
 	 * Read the build id if possible. This is required for
 	 * Read the build id if possible. This is required for
 	 * DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work
 	 * DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work
 	 */
 	 */
-	if (filename__read_build_id(dso->name, build_id, BUILD_ID_SIZE) > 0)
+	if (filename__read_build_id(dso->long_name, build_id, BUILD_ID_SIZE) > 0)
 		dso__set_build_id(dso, build_id);
 		dso__set_build_id(dso, build_id);
 
 
 	/*
 	/*