aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/include
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2025-07-24 09:32:46 -0700
committerNamhyung Kim <namhyung@kernel.org>2025-07-25 10:37:56 -0700
commitd9f2ecbc5e47fca7bda7c13cff3b3534b1467b32 (patch)
treee5e944f16b5bec14ec88a2e49340e7556b820771 /tools/perf/include
parentperf build-id: Ensure struct build_id is empty before use (diff)
downloadlinux-d9f2ecbc5e47fca7bda7c13cff3b3534b1467b32.tar.gz
linux-d9f2ecbc5e47fca7bda7c13cff3b3534b1467b32.zip
perf dso: Move build_id to dso_id
The dso_id previously contained the major, minor, inode and inode generation information from a mmap2 event - the inode generation would be zero when reading from /proc/pid/maps. The build_id was in the dso. With build ID mmap2 events these fields wouldn't be initialized which would largely mean the special empty case where any dso would match for equality. This isn't desirable as if a dso is replaced we want the comparison to yield a difference. To support detecting the difference between DSOs based on build_id, move the build_id out of the DSO and into the dso_id. The dso_id is also stored in the DSO so nothing is lost. Capture in the dso_id what parts have been initialized and rename dso_id__inject to dso_id__improve_id so that it is clear the dso_id is being improved upon with additional information. With the build_id in the dso_id, use memcmp to compare for equality. Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250724163302.596743-7-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/include')
-rw-r--r--tools/perf/include/perf/perf_dlfilter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/include/perf/perf_dlfilter.h b/tools/perf/include/perf/perf_dlfilter.h
index 16fc4568ac53..2d3540ed3c58 100644
--- a/tools/perf/include/perf/perf_dlfilter.h
+++ b/tools/perf/include/perf/perf_dlfilter.h
@@ -87,7 +87,7 @@ struct perf_dlfilter_al {
__u8 is_64_bit; /* Only valid if dso is not NULL */
__u8 is_kernel_ip; /* True if in kernel space */
__u32 buildid_size;
- __u8 *buildid;
+ const __u8 *buildid;
/* Below members are only populated by resolve_ip() */
__u8 filtered; /* True if this sample event will be filtered out */
const char *comm;