From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masahiro Yamada Date: Tue, 18 Feb 2014 18:02:37 +0900 Subject: [U-Boot] [PATCH v8 0/38] Switch over to real Kbuild In-Reply-To: References: Message-ID: <20140218180236.A12A.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Simon, > > I'm not sure whether to start a new thread or not, but here in one > observations which might be useful. > > With current master, a 'null' build (with nothing changed) takes about > 5s for me. > > time CROSS_COMPILE=/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/bin/arm > -linux-gnueabihf- ARCH=arm make -j1 > real 0m4.978s > user 0m1.144s > sys 0m0.360s > > > With the kbuild series, it takes a lot longer: > > real 0m46.600s > user 0m17.628s > sys 0m8.664s Thanks for your feedback. Hmm, Kbuild is 9 times slower on your computer. This is a big difference. (It was about 1.6 x slower on my box.) I don't know where such a difference came from. > There seem to be noticeable pauses between things happening. I'm not > quite sure how to dig into it more. Is it possible that cc-option is > no-longer caching the various compiler options? I guess it's possible. Is sandbox build slow as well? Sandbox has no cc-option. If cc-option is the cause of pauses, sandbox build should be faster. Anyway, evaluating cc-option multiple times isn't nice and its optimization is on my TODO list. Historically, U-Boot has included all config.mk (arch/*/config.mk and board/*/config.mk) every time descending into subdirectories. That means cc-options are evaluated over and over again. Caching cc-option is one of work arounds, but we should not revive it. What we should do is to include arch/*/config.mk and board/*/config.mk only once at the top Makefile and export options. Best Regards Masahiro Yamada