BPF List
 help / color / mirror / Atom feed
* [PATCH v3 bpf-next] scripts/pahole-flags.sh: Parse DWARF and generate BTF with multithreading.
@ 2022-02-17 17:54 Kui-Feng Lee
  2022-02-22 23:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Kui-Feng Lee @ 2022-02-17 17:54 UTC (permalink / raw)
  To: bpf, ast, daniel, andrii; +Cc: kernel-team, Kui-Feng Lee, Yonghong Song

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 <kuifeng@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
---
 scripts/pahole-flags.sh | 3 +++
 1 file changed, 3 insertions(+)

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}
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-22 23:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17 17:54 [PATCH v3 bpf-next] scripts/pahole-flags.sh: Parse DWARF and generate BTF with multithreading Kui-Feng Lee
2022-02-22 23:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox