summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/dso.h
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2022-03-04 09:09:56 +0000
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-03-12 11:01:12 -0300
commitf693dac4794fae99c04f75a3a1a5c4018bb33144 (patch)
tree77fbe905678e26ca6a2aa761b9fd4a17b2995aa2 /tools/perf/util/dso.h
parent7177a4792660c605906582ef0bb8f6bb7ff971a1 (diff)
downloadlinux-f693dac4794fae99c04f75a3a1a5c4018bb33144.tar.bz2
perf tools: Set build-id using build-id header on new mmap records
MMAP records that occur after the build-id header is parsed do not have their build-id set even if the filename matches an entry from the header. Set the build-id on these dsos as long as the MMAP record doesn't have its own build-id set. This fixes an issue with off target analysis where the local version of a dso is loaded rather than one from ~/.debug via a build-id. Reported-by: Denis Nikitin <denik@chromium.org> Signed-off-by: James Clark <james.clark@arm.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20220304090956.2048712-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/dso.h')
-rw-r--r--tools/perf/util/dso.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index 011da3924fc1..3a9fd4d389b5 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -167,6 +167,7 @@ struct dso {
enum dso_load_errno load_errno;
u8 adjust_symbols:1;
u8 has_build_id:1;
+ u8 header_build_id:1;
u8 has_srcline:1;
u8 hit:1;
u8 annotate_warned:1;