Re: Very slow clang kernel config ..

From: Nick Desaulniers
Date: Fri Apr 30 2021 - 20:24:11 EST


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

> + 1.14% libc-2.31.so [.] __strlen_avx2
> + 1.06% libc-2.31.so [.] malloc
> + 1.03% clang-13 [.] llvm::StringMapImpl::LookupBucketFor
> 1.01% libc-2.31.so [.] __memmove_avx_unaligned_erms
> + 0.76% conf [.] yylex

^ kconfig

> + 0.68% clang-13 [.] llvm::Instruction::getNumSuccessors
> + 0.63% libbfd-2.35.2-system.so [.] bfd_hash_lookup

^ bfd

> + 0.63% clang-13 [.] llvm::PMDataManager::findAnalysisPass

^ this is another suspect one to me, though perhaps I should isolate
out the HOSTCC invocations vs cc-option checks. Should retest with
just CC=clang rather than HOSTCC=clang set via LLVM=1.

> + 0.63% ld-2.31.so [.] _dl_lookup_symbol_x

^ bfd

> 0.62% libc-2.31.so [.] __memcmp_avx2_movbe
> 0.60% libc-2.31.so [.] __strcmp_avx2
> + 0.56% clang-13 [.] llvm::ValueHandleBase::AddToUseList
> + 0.56% clang-13 [.]
> llvm::operator==<llvm::DenseMap<llvm::BasicBlock const*, unsigned int,
> llvm::DenseMapInfo<llvm::BasicBlock const*>, llvm::detail::Dense
> 0.53% clang-13 [.]
> llvm::SmallPtrSetImplBase::insert_imp_big


--
Thanks,
~Nick Desaulniers