Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Issue 8400082: Ninja: separate dependencies for compile steps vs actions/rules/copies (Closed)

Created:
9 years, 1 month ago by piman
Modified:
9 years, 1 month ago
Reviewers:
tony, Nico, Evan Martin
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Ninja: separate dependencies for compile steps vs actions/rules/copies Currently, if library A depends on library B, we always wait until B has linked before compiling objects for A. That's not necessary, and overly constricts the build. Instead, we keep a separate dependency tree of "action" depends and "compile" depends. Compile steps in target A depend on actions (in target A or any of its dependencies), but not directly on other compiles. Action steps still depend on compile and link steps of dependent targets. That allows for much higher parallelism. BUG=None TEST=Make -j 10000 chrome Committed: http://code.google.com/p/gyp/source/detail?r=1087

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix final dependencies, adding test #

Patch Set 3 : style #

Total comments: 5

Patch Set 4 : copyright year #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -17 lines) Patch
M pylib/gyp/generator/ninja.py View 1 2 6 chunks +32 lines, -17 lines 0 comments Download
A test/ninja/action_dependencies/gyptest-action-dependencies.py View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A test/ninja/action_dependencies/src/a.h View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
A test/ninja/action_dependencies/src/a.c View 1 1 chunk +9 lines, -0 lines 0 comments Download
A test/ninja/action_dependencies/src/action_dependencies.gyp View 1 1 chunk +88 lines, -0 lines 0 comments Download
A test/ninja/action_dependencies/src/b.h View 1 1 chunk +12 lines, -0 lines 0 comments Download
A test/ninja/action_dependencies/src/b.c View 1 1 chunk +16 lines, -0 lines 0 comments Download
A test/ninja/action_dependencies/src/c.h View 1 1 chunk +12 lines, -0 lines 0 comments Download
A test/ninja/action_dependencies/src/c.c View 1 1 chunk +9 lines, -0 lines 0 comments Download
A test/ninja/action_dependencies/src/emit.py View 1 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
piman
9 years, 1 month ago (2011-10-29 01:58:35 UTC) #1
tony
(moving discussion from http://codereview.chromium.org/8417017/ here) A few comments/questions: - How will you make sure this ...
9 years, 1 month ago (2011-10-31 20:43:33 UTC) #2
tony
I would love to see this move forward. Are we waiting for unit tests from ...
9 years, 1 month ago (2011-11-03 23:55:30 UTC) #3
piman
I added a test, and fixed a case where the final target wouldn't always force ...
9 years, 1 month ago (2011-11-04 03:51:51 UTC) #4
Nico
I don't have anything interesting to say; this looks pretty good. I'd add "This is ...
9 years, 1 month ago (2011-11-08 04:26:57 UTC) #5
Nico
Backfill from email, since that didn't make it here for some reason: piman: """ On ...
9 years, 1 month ago (2011-11-08 04:28:28 UTC) #6
piman
http://codereview.chromium.org/8400082/diff/9001/test/ninja/action_dependencies/gyptest-action-dependencies.py File test/ninja/action_dependencies/gyptest-action-dependencies.py (right): http://codereview.chromium.org/8400082/diff/9001/test/ninja/action_dependencies/gyptest-action-dependencies.py#newcode3 test/ninja/action_dependencies/gyptest-action-dependencies.py:3: # Copyright (c) 2009 Google Inc. All rights reserved. ...
9 years, 1 month ago (2011-11-08 22:01:41 UTC) #7
Nico
9 years, 1 month ago (2011-11-09 19:47:55 UTC) #8
LGTM

You're a gyp committer, right? Else, ping me, and I'll land it.

http://codereview.chromium.org/8400082/diff/9001/test/ninja/action_dependenci...
File test/ninja/action_dependencies/gyptest-action-dependencies.py (right):

http://codereview.chromium.org/8400082/diff/9001/test/ninja/action_dependenci...
test/ninja/action_dependencies/gyptest-action-dependencies.py:14: test =
TestGyp.TestGyp(formats=['ninja'])
> The test will not work with other generators because:
> - it explicitly tests the optimization, which is not implemented (yet?) on
other
> generators
> - it relies on the exact path to output object files, which is generator
> dependent, and actually, relies on the ability to build only that object file,
> which I don't think is available on all generators.

Makes sense. Maybe add this as a comment.

> That being said, I think the optimization could be implemented in the make
> generator, in which case, it'll be worth the effort to make that test run
there.

Do you have numbers on how much this helps with -j100? (But I guess we could
increase the 100 on the bots if it helps a lot in make, but only with higher
parallelism)

Are you interested in working on this? :-)

Powered by Google App Engine
This is Rietveld 408576698