Re: Very slow clang kernel config ..

From: Nick Desaulniers
Date: Fri Apr 30 2021 - 20:41:12 EST


On Fri, Apr 30, 2021 at 5:25 PM Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
>
> On Fri, Apr 30, 2021 at 5:23 PM Nick Desaulniers
> <ndesaulniers@xxxxxxxxxx> wrote:
> >
> > On Fri, Apr 30, 2021 at 5:19 PM Nick Desaulniers
> > <ndesaulniers@xxxxxxxxxx> wrote:
> > >
> > > A quick:
> > > $ perf record -e cycles:pp --call-graph lbr make LLVM=1 LLVM_IAS=1
> > > -j72 allmodconfig
> > > $ perf report --no-children --sort=dso,symbol
> > > shows:
> > > 2.35% [unknown] [k] 0xffffffffabc00fc7
> > > + 2.29% libc-2.31.so [.] _int_malloc
> > > 1.24% libc-2.31.so [.] _int_free
> > > + 1.23% ld-2.31.so [.] do_lookup_x
> >
> > ^ bfd
>
>
> > > + 0.63% ld-2.31.so [.] _dl_lookup_symbol_x
> >
> > ^ bfd
>
> Ah, no, sorry, these are the runtime link editor/loader. So probably
> spending quite some time resolving symbols in large binaries.

I don't see NOW in:
$ llvm-readelf -Wd `which clang`
so I don't think clang was linked as `-Wl,-z,now`. I also see both
.hash and .gnu.hash in
$ llvm-readelf -S `which clang`.

The presence of NOW or lack of .gnu.hash would have been my guess for
symbol lookup issues. Perhaps the length of C++ mangled symbols
doesn't help.
--
Thanks,
~Nick Desaulniers