public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Steven Shi" <steven.shi@intel.com>
To: devel@edk2.groups.io
Cc: bob.c.feng@intel.com, yuwei.chen@intel.com, ardb@kernel.org,
	leif@nuviainc.com, abner.chang@hpe.com, daniel.schaefer@hpe.com,
	Steven Shi <steven.shi@intel.com>
Subject: [PATCH 0/1] Enable GNU make parallel jobs by default for GCC5 and CLANGPDB ToolChains
Date: Mon, 17 Jan 2022 22:42:50 +0800	[thread overview]
Message-ID: <20220117144251.1087-1-steven.shi@intel.com> (raw)

The GNU make parallel jobs flgs (-j or --jobs) can significantly (~30%) improve the edk2 build time in Linux.
This patch enable the GNU make parallel jobs by default.
Below the OVMF test result on GCC5 and CLANGPDB toolchains:

GCC5 build without patch:
jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ time build -p OvmfPkg/OvmfPkgIa32X64.dsc -a IA32 -a X64 -t GCC5 -DSECURE_BOOT_ENABLE=TRUE
real    0m58.784s
user    5m18.820s
sys     0m46.337s
GCC5 build with patch:
jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ time build -p OvmfPkg/OvmfPkgIa32X64.dsc -a IA32 -a X64 -t GCC5 -DSECURE_BOOT_ENABLE=TRUE
real    0m41.547s
user    5m23.617s
sys     0m47.397s

GCC5 build time improved by +29%

CLANGPDB build without patch:
jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ time build -p OvmfPkg/OvmfPkgIa32X64.dsc -a IA32 -a X64 -t CLANGPDB -DSECURE_BOOT_ENABLE=TRUE
real    1m4.162s
user    4m15.025s
sys     0m30.480s

CLANGPDB build with patch:
jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ time build -p OvmfPkg/OvmfPkgIa32X64.dsc -a IA32 -a X64 -t CLANGPDB -DSECURE_BOOT_ENABLE=TRUE
real    0m31.307s
user    4m21.952s
sys     0m30.641s
CLANGPDB build time improved by +51%


Steven Shi (1):
  BaseTools: Enable GNU make parallel jobs by default

 BaseTools/Conf/tools_def.template                  |  4 ++++
 BaseTools/Source/Python/AutoGen/GenMake.py         |  5 +++--
 BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 12 +++++++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)

-- 
2.22.0.windows.1


             reply	other threads:[~2022-01-17 14:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 14:42 Steven Shi [this message]
2022-01-17 14:42 ` [PATCH 1/1] BaseTools: Enable GNU make parallel jobs by default Steven Shi
2022-01-17 14:54   ` Steven Shi
2022-01-19 10:52     ` [edk2-devel] " Steven Shi
2022-01-19 15:03       ` Abner Chang
2022-01-27  3:00   ` Bob Feng

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-list 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=20220117144251.1087-1-steven.shi@intel.com \
    --to=devel@edk2.groups.io \
    /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