mbox series

[v2,0/6] kbuild: optimize output directory creation

Message ID 1510568979-24440-1-git-send-email-yamada.masahiro@socionext.com
Headers show
Series kbuild: optimize output directory creation | expand

Message

Masahiro Yamada Nov. 13, 2017, 10:29 a.m. UTC
I looked into the build scripts, focusing on "mkdir" optimization.

With this series, I succeeded in speeding up the incremental build
with O= option.

The following is the result of "time make O=foo",
where "foo" is the output directory that has already been built.

Before:

real    0m8.322s
user    0m4.324s
sys     0m1.220s

After:

real    0m6.989s
user    0m4.168s
sys     0m1.080s

4/6 gave the biggest impact.



Masahiro Yamada (6):
  kbuild: create directory for make cache only when necessary
  kbuild: remove redundant $(wildcard ...) for cmd_files calculation
  kbuild: filter-out PHONY targets from "targets"
  kbuild: create object directories simpler and faster
  kbuild: optimize object directory creation for incremental build
  kbuild: remove redundant mkdir from ./Kbuild

 Kbuild                       |  2 --
 Makefile                     |  3 +--
 arch/x86/entry/vdso/Makefile |  4 ----
 scripts/Kbuild.include       | 13 +++++++++----
 scripts/Makefile.build       | 25 +++++++++++++------------
 scripts/Makefile.headersinst |  3 +--
 scripts/Makefile.host        | 12 ------------
 scripts/Makefile.lib         |  5 -----
 scripts/Makefile.modpost     |  3 +--
 9 files changed, 25 insertions(+), 45 deletions(-)

-- 
2.7.4

Comments

Masahiro Yamada Nov. 16, 2017, 12:10 a.m. UTC | #1
2017-11-13 19:29 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
>

> I looked into the build scripts, focusing on "mkdir" optimization.

>

> With this series, I succeeded in speeding up the incremental build

> with O= option.

>

> The following is the result of "time make O=foo",

> where "foo" is the output directory that has already been built.

>

> Before:

>

> real    0m8.322s

> user    0m4.324s

> sys     0m1.220s

>

> After:

>

> real    0m6.989s

> user    0m4.168s

> sys     0m1.080s

>

> 4/6 gave the biggest impact.

>

>



Series, applied to linux-kbuild/kbuild.

-- 
Best Regards
Masahiro Yamada