• A
    btf: allow to customize dedup hash table size · 51edf5f6
    Andrii Nakryiko 提交于
    Default size of dedup table (16k) is good enough for most binaries, even
    typical vmlinux images. But there are cases of binaries with huge amount
    of BTF types (e.g., allyesconfig variants of kernel), which benefit from
    having bigger dedup table size to lower amount of unnecessary hash
    collisions. Tools like pahole, thus, can tune this parameter to reach
    optimal performance.
    
    This change also serves double purpose of allowing tests to force hash
    collisions to test some corner cases, used in follow up patch.
    Signed-off-by: NAndrii Nakryiko <andriin@fb.com>
    Acked-by: NYonghong Song <yhs@fb.com>
    Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
    51edf5f6
btf.c 69.2 KB