From: Rabin Vincent <rabin@rab.in>
To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Faster incremental builds with Ninja
Date: Mon, 27 Jun 2016 20:50:29 +0200 [thread overview]
Message-ID: <20160627185029.GA26878@debian> (raw)
Ninja is a small build system with a focus on speed. More details at
https://ninja-build.org/.
I made an experimental Ninja build file generator for the kernel. The
purpose was to see how much we could decrease compile times (especially
to detect errors) for single file changes. Results on my machine and
x86 defconfig:
| Change | make -j8 | make -j8 objectname | ninja |
| --------------------------| -------- | ------------------- | ------ |
| No changes | 2.254s | 0.731s | 0.065s |
| One change, compile error | 1.225s | 0.765s | 0.077s |
| One change, full link | 5.915s | NA | 4.482s |
The link time unsuprisingly dominates when performing small changes, but
as can be seen the time until the start of compilation (and thus the
time until any compile errors are detected) is several times smaller
with ninja.
These numbers were measured with the benchmark.sh included in the
repository.
https://github.com/rabinv/kninja
I'm not posting the code as patches here since it's basically a hack.
It parses make's --print-data-base output and requires a full build to
have been performed with make before it can generate the ninja build
files. Configuration changes and various files with special generation
rules are not handled.
Perhaps it is useful for "personal use" or as inspiration for
optimizations to Kbuild.
reply other threads:[~2016-06-27 18:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160627185029.GA26878@debian \
--to=rabin@rab.in \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox