From: Kui-Feng Lee Date: Thu, 17 Feb 2022 17:54:27 +0000 (-0800) Subject: scripts/pahole-flags.sh: Parse DWARF and generate BTF with multithreading. X-Git-Tag: v5.18-rc1~136^2~185^2~22 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b4f72786429cc57383ff41e02407726313ca178d;p=linux-block.git scripts/pahole-flags.sh: Parse DWARF and generate BTF with multithreading. Pass a "-j" argument to pahole if possible to reduce the time of generating BTF info. Since v1.22, pahole can parse DWARF and generate BTF with multithreading to speed up the conversion. It will reduce the overall build time of the kernel for seconds. v3 fixes whitespaces and improves the commit description. v2 checks the version of pahole to enable multithreading only if possible. [v2] https://lore.kernel.org/bpf/20220216193431.2691015-1-kuifeng@fb.com/ [v1] https://lore.kernel.org/bpf/20220216004616.2079689-1-kuifeng@fb.com/ Signed-off-by: Kui-Feng Lee Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20220217175427.649713-1-kuifeng@fb.com --- diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh index c293941612e7..0d99ef17e4a5 100755 --- a/scripts/pahole-flags.sh +++ b/scripts/pahole-flags.sh @@ -16,5 +16,8 @@ fi if [ "${pahole_ver}" -ge "121" ]; then extra_paholeopt="${extra_paholeopt} --btf_gen_floats" fi +if [ "${pahole_ver}" -ge "122" ]; then + extra_paholeopt="${extra_paholeopt} -j" +fi echo ${extra_paholeopt}