perf record: Make --buildid-mmap the default
authorIan Rogers <irogers@google.com>
Thu, 24 Jul 2025 16:32:48 +0000 (09:32 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 25 Jul 2025 17:37:56 +0000 (10:37 -0700)
commit53b00ff358dc75b12042b2b2aaf1d0e998fd0075
tree0949ee937a7c28b64a41140a65f7cf7e13f42b54
parent5b11409b924631745eef60a65218ffa496acafd6
perf record: Make --buildid-mmap the default

Support for build IDs in mmap2 perf events has been present since
Linux v5.12:
https://lore.kernel.org/lkml/20210219194619.1780437-1-acme@kernel.org/
Build ID mmap events don't avoid the need to inject build IDs for DSO
touched by samples as the build ID cache is populated by perf
record. They can avoid some cases of symbol mis-resolution caused by
the file system changing from when a sample occurred and when the DSO
is sought.

Unlike the --buildid-mmap option, this chnage doesn't disable the
build ID cache but it does disable the processing of samples looking
for DSOs to inject build IDs for. To disable the build ID cache the -B
(--no-buildid) option should be used.

Making this option the default was raised on the list in:
https://lore.kernel.org/linux-perf-users/CAP-5=fXP7jN_QrGUcd55_QH5J-Y-FCaJ6=NaHVtyx0oyNh8_-Q@mail.gmail.com/

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250724163302.596743-9-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/Documentation/perf-record.txt
tools/perf/builtin-record.c
tools/perf/util/symbol_conf.h
tools/perf/util/synthetic-events.c