Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1308660 > unrolled thread

[PATCH] perf tools: Fix reading of build-id from vDSO

Started byBen Hutchings <ben@decadent.org.uk>
First post2016-01-13 18:30 +0100
Last post2016-01-13 21:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] perf tools: Fix reading of build-id from vDSO Ben Hutchings <ben@decadent.org.uk> - 2016-01-13 18:30 +0100
    Re: [PATCH] perf tools: Fix reading of build-id from vDSO Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-13 21:00 +0100

#1308660 — [PATCH] perf tools: Fix reading of build-id from vDSO

FromBen Hutchings <ben@decadent.org.uk>
Date2016-01-13 18:30 +0100
Subject[PATCH] perf tools: Fix reading of build-id from vDSO
Message-ID<qQxp9-2W5-35@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

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>
---
 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 cd08027..b60bc49 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1465,7 +1465,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 (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);
 
 	/*

[toc] | [next] | [standalone]


#1308775

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-01-13 21:00 +0100
Message-ID<qQzKi-4mW-5@gated-at.bofh.it>
In reply to#1308660
Em Wed, Jan 13, 2016 at 05:23:01PM +0000, Ben Hutchings escreveu:
> 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.

Thanks, we should really prefer the long_name, applied.

- Arnaldo
 
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
>  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 cd08027..b60bc49 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -1465,7 +1465,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 (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);
>  
>  	/*

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web