diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-02-17 12:13:41 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-02-17 12:13:41 -0300 |
commit | a25293a66b737263fd4545752077c098dd19ed26 (patch) | |
tree | e824205351cabc8ed303be564224ef1ecff53481 | |
parent | e52cf114039af8f3df25a707235d382c96847104 (diff) | |
download | pahole-a25293a66b737263fd4545752077c098dd19ed26.tar.gz |
btfdiff: Parallelize loading BTF and DWARF
DWARF is already loaded in parallel, one thread per CPU, we did it for
BTF encoding that is used when building the kernel.
Now just start that in parallel for pretty printing from DWARF and then
do it for BTF, then wait for DWARF to finish to continue and do the
diff.
Not a big deal with a 28 core i7 14700 Intel Rocket Lake refresh with 28
cores (a mix of efficiency and performance cores), but maybe with more
and more cores this may end up making _some_ difference.
The patch is so small, and since I tried it, keep it.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | btfdiff | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -31,13 +31,17 @@ ${pahole_bin} -F dwarf \ --suppress_force_paddings \ --suppress_packed \ --lang_exclude rust \ - --show_private_classes $dwarf_input > $dwarf_output + --show_private_classes $dwarf_input > $dwarf_output & +dwarf=$! + ${pahole_bin} -F btf \ --sort \ --suppress_aligned_attribute \ --suppress_packed \ $btf_input > $btf_output +wait $dwarf + diff -up $dwarf_output $btf_output rm -f $btf_output $dwarf_output |