Touching chrome/VERSION causes ~13900 build steps to run |
||
Issue descriptionAs of today if you build the 'chrome' target, then "touch chrome/VERSION", then build the chrome target again then about 13,900 build steps will be run. In addition, the .ninja files seem to be continuously dirty even after a gn gen. This was originally reported here: https://groups.google.com/a/chromium.org/forum/?pli=1#!msg/chromium-dev/L3zyEzT3VBc/s3DnkfduCwAJ See there for details and related issues. In particular note the -d explain output after touching CHROME/VERSION: c:\src\chromium3\src\out\release>ninja -d explain chrome ninja.exe -d explain chrome -j 960 -l 48 -d keeprsp ninja explain: recorded mtime of build.ninja older than most recent input ../../chrome/VERSION (538968506 vs 539221964) [1 processes, 1/1 @ 0.3/s : 3.266s ] Regenerating ninja files ninja explain: output obj/chrome/chrome_exe_version_action.inputdeps.stamp older than most recent input ../../chrome/VERSION (538968510 vs 539221964) ninja explain: obj/chrome/chrome_exe_version_action.inputdeps.stamp is dirty ninja explain: gen/chrome/chrome_exe_version.rc is dirty ninja explain: obj/chrome/chrome_exe_version_action.stamp is dirty ninja explain: output obj/mojo/public/tools/bindings/precompile_templates.inputdeps.stamp older than most recent input ../../chrome/VERSION (538968511 vs 539221964) ninja explain: obj/mojo/public/tools/bindings/precompile_templates.inputdeps.stamp is dirty ... So for some reason there is a chain of dependencies that leads to mojo and (I think) from mojo to everything else. That results in ~13,900 build steps being run, which is a lot for "touch chrome/VERSION"
,
Feb 1 2018
Yeah, it's because changing VERSION affects generation of code like this: https://cs.chromium.org/chromium/src/out/Debug/gen/chrome/common/search.mojom-shared-internal.h?rcl=2360560424e3006e62b0061e0c16872a5ef2a5bd&l=40 We can move the values out of the header.
,
Feb 9 2018
Any progress? I think my CL mitigated this issue, but there is yet several thousands build tasks when touching chrome/VERSION. https://chromium-review.googlesource.com/c/chromium/src/+/908268 Reducing incremental build tasks will improve build speed on tryserver.
,
Feb 9 2018
Sorry, yeah, I threw together a CL at https://chromium-review.googlesource.com/c/chromium/src/+/900528 a few days ago, but haven't had time to debug something subtle I apparently got wrong with the behavior of the configuration arg.
,
Feb 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6 commit 2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6 Author: Ken Rockot <rockot@chromium.org> Date: Fri Feb 16 23:08:14 2018 Reduce rebuild cost of VERSION changes Touching VERSION elicits a regeneration of all mojom message IDs on platforms where message ID scrambling is enabled. Before this CL, that regeneration step induces a rebuild of over 13000 targets when building chrome, as all mojom headers are regenerated, and dependencies on mojom headers abound. After this CL, the regeneration step only forces a rebuild of a new per-mojom header dedicated exclusively to message ID definitions, affecting only the corresponding mojom.cc files and reducing the rebuild cost to about 2700 targets. This also introduces a new GN arg |enable_mojom_message_id_scrambling| which defaults to |true|, enabling the current scrambling behavior on all supported platforms. If set to |false|, message IDs will never be scrambled and changes to VERSION won't affect mojom in any way. Bug: 808162 Change-Id: I8c4e4fa1dcc8d1d4349febee7dea6cce824ca0a6 Reviewed-on: https://chromium-review.googlesource.com/900528 Reviewed-by: Jay Civelli <jcivelli@chromium.org> Commit-Queue: Ken Rockot <rockot@chromium.org> Cr-Commit-Position: refs/heads/master@{#537446} [modify] https://crrev.com/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6/mojo/public/tools/bindings/BUILD.gn [modify] https://crrev.com/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6/mojo/public/tools/bindings/generators/cpp_templates/module-shared-internal.h.tmpl [add] https://crrev.com/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6/mojo/public/tools/bindings/generators/cpp_templates/module-shared-message-ids.h.tmpl [modify] https://crrev.com/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6/mojo/public/tools/bindings/generators/cpp_templates/module-shared.cc.tmpl [modify] https://crrev.com/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl [modify] https://crrev.com/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6/mojo/public/tools/bindings/generators/mojom_cpp_generator.py [modify] https://crrev.com/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6/mojo/public/tools/bindings/mojom.gni [modify] https://crrev.com/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6/mojo/public/tools/bindings/mojom_bindings_generator.py [modify] https://crrev.com/2cdc649c230ae5c9edac93db2d9243a2f8bbe6b6/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
,
Oct 17
|
||
►
Sign in to add a comment |
||
Comment 1 by brucedaw...@chromium.org
, Feb 1 2018