diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2025-12-17 10:39:27 -0800 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-01-13 17:15:27 -0300 |
| commit | 9f8f5edc79b6f22d0b4510d08b6a9c6e7f2c96e5 (patch) | |
| tree | 5da3d95ab19c02beb24cea4373c18824be7aa22c /tools/perf/scripts/python | |
| parent | e35dd81017011be0fb0cbb2ae80a6bc24962f0f7 (diff) | |
| download | linux-9f8f5edc79b6f22d0b4510d08b6a9c6e7f2c96e5.tar.gz linux-9f8f5edc79b6f22d0b4510d08b6a9c6e7f2c96e5.zip | |
perf inject: Keep build-ID data if no option is used
The keep_feat() determines which header features will be kept or
discarded. Usually 'perf inject' will add build-IDs based on -b, -B or
other related options. But it lose build-ID when none of those options
are used. This is meaningful only when --buildid-mmap is not used.
The following example shows the impact of this change.
$ perf record --no-buildid-mmap true
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.037 MB perf.data (5 samples) ]
$ perf inject -i perf.data -o perf.data.inject
$ perf buildid-list -i perf.data
08cccc2a9388d5247ccb3e864f3063b975b0a15d /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
fd5c4d5673256cd6bda51725dba048dabb0f854e [kernel.kallsyms]
97a36ce1140071be5c36b147fa0bed173e05a602 [vdso]
$ perf buildid-list -i perf.data.inject
97a36ce1140071be5c36b147fa0bed173e05a602 [vdso]
With this change, perf.data.inject would show the same list (of course,
you need to run perf inject again).
Reported-by: Gabriel Marin <gmx@google.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
