RESOLVED FIXED 177057
build-webkit spawns fewer subprocesses than ninja uses by default
https://bugs.webkit.org/show_bug.cgi?id=177057
Summary build-webkit spawns fewer subprocesses than ninja uses by default
Tim Horton
Reported 2017-09-17 14:02:35 PDT
build-webkit spawns fewer subprocesses than ninja uses by default
Attachments
Patch (1.75 KB, patch)
2017-09-17 14:02 PDT, Tim Horton
no flags
Tim Horton
Comment 1 2017-09-17 14:02:55 PDT
Alexey Proskuryakov
Comment 2 2017-09-17 14:56:14 PDT
Comment on attachment 321054 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321054&action=review > Tools/Scripts/build-webkit:245 > + # so don't override the number of jobs if building with Ninja. Would this number be better when not building with ninja, too? The comment should at least explain why (e.g. “I didn’t test, and didn’t want to make the change blindly”).
Tim Horton
Comment 3 2017-09-17 14:57:48 PDT
Comment on attachment 321054 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321054&action=review >> Tools/Scripts/build-webkit:245 >> + # so don't override the number of jobs if building with Ninja. > > Would this number be better when not building with ninja, too? The comment should at least explain why (e.g. “I didn’t test, and didn’t want to make the change blindly”). I considered it, and would happily make the change blindly, but I’m also not sure anybody cares about those builds (it won’t affect Xcode, for example — just non-Windows non-Ninja CMake builds).
Alex Christensen
Comment 4 2017-09-18 08:13:12 PDT
Comment on attachment 321054 [details] Patch We should only make this change for ninja, which automatically determines the number of jobs to do at the same time. If we do this for non-ninja builds, it would make them take ~8x as long because make defaults to using 1 cpu.
Tim Horton
Comment 5 2017-09-18 08:17:09 PDT
I think (at least I assume) ap meant adding the “+2” to the make invocation
Alexey Proskuryakov
Comment 6 2017-09-18 09:20:17 PDT
Correct.
WebKit Commit Bot
Comment 7 2017-09-18 09:54:47 PDT
Comment on attachment 321054 [details] Patch Clearing flags on attachment: 321054 Committed r222160: <http://trac.webkit.org/changeset/222160>
WebKit Commit Bot
Comment 8 2017-09-18 09:54:49 PDT
All reviewed patches have been landed. Closing bug.
Konstantin Tokarev
Comment 9 2017-09-20 10:43:24 PDT
Comment on attachment 321054 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321054&action=review > Tools/Scripts/build-webkit:242 > if (isCMakeBuild() && !isAnyWindows()) { > + if (!canUseNinja()) { This condition is wrong, $willUseNinja in generateBuildSystemFromCMakeProject() determines what cmake generator is used, and it's defined as canUseNinja() && canUseNinjaGenerator()
Konstantin Tokarev
Comment 10 2017-09-20 10:45:25 PDT
Though canUseNinjaGenerator can be eleminated, as all required cmake versions should support -G Ninja
Tim Horton
Comment 11 2017-09-20 10:50:30 PDT
(In reply to Konstantin Tokarev from comment #10) > Though canUseNinjaGenerator can be eleminated, as all required cmake > versions should support -G Ninja Doesn't that then make the patch right? :P
Konstantin Tokarev
Comment 12 2017-09-20 11:00:11 PDT
Yes, it does. CMake enables Ninja generator on all supported platforms since v2.8.9 (https://github.com/Kitware/CMake/commit/5d365b26ec6ce089f1a5e0bfed523cb5f916f1da) and we require v3.3
Tim Horton
Comment 13 2017-09-20 11:23:59 PDT
Nice
Tim Horton
Comment 14 2017-09-21 16:29:37 PDT
Got rid of it in bug 177330
Konstantin Tokarev
Comment 15 2017-09-22 03:15:42 PDT
Thanks!
Carlos Alberto Lopez Perez
Comment 16 2017-09-25 03:33:01 PDT
(In reply to WebKit Commit Bot from comment #7) > Comment on attachment 321054 [details] > Patch > > Clearing flags on attachment: 321054 > > Committed r222160: <http://trac.webkit.org/changeset/222160> This patch has broken our bots. We need to control the number of build parallel process there as we share the machine between several bots (each one run in a container). And if we allow all of them to use all the available cores bad things happen. See bug 177223 I think that when the environment variable NUMBER_OF_PROCESSORS is defined it should be respected (both for ninja and make). I will try to upload a patch to bug 177223 ASAP
Radar WebKit Bug Importer
Comment 17 2017-09-27 12:26:32 PDT
Note You need to log in before you can comment on or make changes to this bug.