From ea4dea20adf600dbdc7327765ff4aaf190c6d8fc Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 19 Jan 2016 00:18:11 +0000 Subject: [PATCH] linux-perf: Fix reading of build-id from vDSO --- debian/changelog | 3 +++ ...ls-fix-reading-of-build-id-from-vdso.patch | 26 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 30 insertions(+) create mode 100644 debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch diff --git a/debian/changelog b/debian/changelog index a111dd24f..db23e48d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ linux-tools (4.4-1~exp1) UNRELEASED; urgency=medium * New upstream release + [ Ben Hutchings ] + * linux-perf: Fix reading of build-id from vDSO + -- Ben Hutchings Tue, 19 Jan 2016 00:04:27 +0000 linux-tools (4.4~rc4-1~exp1) experimental; urgency=medium diff --git a/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch b/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch new file mode 100644 index 000000000..7ca7c0c57 --- /dev/null +++ b/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch @@ -0,0 +1,26 @@ +From: Ben Hutchings +Date: Wed, 13 Jan 2016 15:16:30 +0000 +Subject: perf tools: Fix reading of build-id from vDSO +Forwarded: http://mid.gmane.org/20160113172301.GT28542@decadent.org.uk + +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 +--- + 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); + + /* diff --git a/debian/patches/series b/debian/patches/series index 880f2ac05..d2ab6e491 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -15,3 +15,4 @@ tools-hv-fix-fortify-format-warning.patch revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch +perf-tools-fix-reading-of-build-id-from-vdso.patch