• Andrii Nakryiko's avatar
    btf: allow to customize dedup hash table size · 51edf5f6
    Andrii Nakryiko authored
    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: default avatarAndrii Nakryiko <andriin@fb.com>
    Acked-by: default avatarYonghong Song <yhs@fb.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    51edf5f6
btf.h 3.4 KB