lkml.org 
[lkml]   [2023]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] modpost: Optimize symbol search from linear to binary search
On Tue, Sep 26, 2023 at 9:40 PM Jack Brennen <jbrennen@google.com> wrote:
>
> Modify modpost to use binary search for converting addresses back
> into symbol references. Previously it used linear search.
>
> This change saves a few seconds of wall time for defconfig builds,
> but can save several minutes on allyesconfigs.
>
> Before:
> $ make LLVM=1 -j128 allyesconfig vmlinux -s KCFLAGS="-Wno-error"
> $ time scripts/mod/modpost -M -m -a -N -o vmlinux.symvers vmlinux.o
> 198.38user 1.27system 3:19.71elapsed
>
> After:
> $ make LLVM=1 -j128 allyesconfig vmlinux -s KCFLAGS="-Wno-error"
> $ time scripts/mod/modpost -M -m -a -N -o vmlinux.symvers vmlinux.o
> 11.91user 0.85system 0:12.78elapsed
>
> Signed-off-by: Jack Brennen <jbrennen@google.com>
> Tested-by: Nick Desaulniers <ndesaulniers@google.com>



Applied to linux-kbuild.
Thanks.



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2023-10-03 13:36    [W:0.055 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site