Re: [GIT PULL 2/2] Kconfig updates for v5.10-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 28, 2020 at 7:05 AM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Nov 27, 2020 at 1:53 PM Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> >     33.68%  cc1plus
>
> So a third of the time is the _single_ invocation of cc1plus, which
> happens from scrips/gcc-plugin.sh doing that
>
>      $HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only
>
> thing. Which is purely to verify that plugins work.
>
> Ugh.
>
> Emese - I'm talking to myself while I'm looking at why "make
> allmodconfig" is so unbearably slow. This is part of it.
>
>               Linus


If you do 'make allmodconfig' from the clean source tree,
some logs are displayed.

If you do that once again, no logs,
which means no recompilation of the 'conf' binary.

Of course, GNU Make evaluates some recipes due to the FORCE,
but the costs are quite small.



As for the cc1plus cost, I got a similar result.

Running scripts/gcc-plugin.sh directly
took me 0.5 sec, which is a fourth
of the allmodconfig run-time.

Actually, I did not know this shell script
was so expensive to run...

I also added Kees to CC.


Even if we are able to manage this script somehow,
Kconfig invocation still takes more than 1 sec
due to the current design.



masahiro@grover:~/workspace/linux$ make mrproper
masahiro@grover:~/workspace/linux$ time make allmodconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#

real 0m4.415s
user 0m3.686s
sys 0m0.763s
masahiro@grover:~/workspace/linux$ time make allmodconfig
#
# No change to .config
#

real 0m2.041s
user 0m1.564s
sys 0m0.519s

masahiro@grover:~/workspace/linux$ export HOSTCC=gcc
masahiro@grover:~/workspace/linux$ time  scripts/gcc-plugin.sh gcc

real 0m0.560s
user 0m0.512s
sys 0m0.048s





-- 
Best Regards
Masahiro Yamada



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux