diff options
author | Antoine Tenart <[email protected]> | 2024-06-24 11:09:07 +0200 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2024-06-24 09:19:42 -0700 |
commit | c73a9683cb21012b6c0f14217974837151c527a8 (patch) | |
tree | f5de59085d4b706dd8324c7167e9a9df7fefae03 /tools/perf/scripts/python/parallel-perf.py | |
parent | 5a532459aa919d055d822d8db4ea2c5c8d511568 (diff) |
libbpf: Skip base btf sanity checks
When upgrading to libbpf 1.3 we noticed a big performance hit while
loading programs using CORE on non base-BTF symbols. This was tracked
down to the new BTF sanity check logic. The issue is the base BTF
definitions are checked first for the base BTF and then again for every
module BTF.
Loading 5 dummy programs (using libbpf-rs) that are using CORE on a
non-base BTF symbol on my system:
- Before this fix: 3s.
- With this fix: 0.1s.
Fix this by only checking the types starting at the BTF start id. This
should ensure the base BTF is still checked as expected but only once
(btf->start_id == 1 when creating the base BTF), and then only
additional types are checked for each module BTF.
Fixes: 3903802bb99a ("libbpf: Add basic BTF sanity validation")
Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Reviewed-by: Alan Maguire <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions