]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf machine: Fix insertion of PERF_RECORD_KSYMBOL related kernel maps
authorNamhyung Kim <namhyung@kernel.org>
Fri, 28 Feb 2025 21:17:34 +0000 (18:17 -0300)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 6 Mar 2025 07:04:07 +0000 (23:04 -0800)
commit41453107bfc3008302c2b98cc01da55890235b77
tree8367dae4a8b7aed5c67c211e5147923f37b98272
parente0e4e0b8b7fabd8c214b838b8cb9a14ac618f16f
perf machine: Fix insertion of PERF_RECORD_KSYMBOL related kernel maps

This was detected at the end of a 'perf record' session when build-id
collection was enabled and thus the BPF programs put in place while the
session was running, some even put in place by perf itself were
processed and inserted, with some overlaps related to BPF trampolines
and programs took place.

Using maps__fixup_overlap_and_insert() instead of maps__insert() "fixes"
the problem, in the sense that overlaps will be dealt with and then the
consistency will be kept, but it would be interesting to fully
understand why such overlaps take place and how to deal with them when
doing symbol resolution.

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Suggested-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/lkml/CAP-5=fXEEMFgPF2aZhKsfrY_En+qoqX20dWfuE_ad73Uxf0ZHQ@mail.gmail.com
Link: https://lore.kernel.org/r/20250228211734.33781-7-acme@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/machine.c