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

Issue 187813008: Add PGO targets to Chrome. (Closed)

Created:
6 years, 9 months ago by Sébastien Marchand
Modified:
6 years, 9 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add PGO targets to Chrome. This allows to do a PGO optimized build of Chrome with the following commands: python build\gyp_chromium -Dchrome_pgo_phase=1 ninja -C out\Release chrome run with '--no-sandbox' + pgosweep python build\gyp_chromium -Dchrome_pgo_phase=2 ninja -C out\Release chrome ----- Approach that didn't worked ----- (see comment #13 to know why this didn't work) Instead of having the following gyp dependency chain (for a regular build), here '->' means 'depends on': 'chrome'->|'chrome_main_dll' ----------|'chrome_child_dll' we know have the following one (when chrome_pgo==1): 'chrome'->|'chrome_main_dll' |->'chrome_pgo_optimize'->|'chrome_main_dll_pgi' ----------|'chrome_child_dll'|-------------------------|'chrome_child_dll_pgi' The '*_pgi' target correspond to the instrumented dll, the name of the DLLs produced by target will be terminated by '_pgi'. During the 'chrome_pgo_optimize' step the instrumented DLLs will be renamed (the '_pgi' suffix will be removed) and Chrome will be run against a set of profile test cases, pgosweep.exe will also be invoked to collect the instrumentation data. Then the main targets ('chrome_main_dll' and 'chrome_child_dll') will be linked with the flag /LTCG:PGOPTIMIZE, this will produce the optimized DLLs. -------------------------------------------- R=scottmg@chromium.org BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257133

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Another approach. #

Patch Set 3 : #

Patch Set 4 : It almost works ! #

Total comments: 1

Patch Set 5 : Simpler approach (but require to build 2 times the same target). #

Total comments: 2

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -1 line) Patch
M build/common.gypi View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M build/internal/release_impl_official.gypi View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M chrome/chrome_dll.gypi View 1 2 3 4 2 chunks +30 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (0 generated)
Sébastien Marchand
Hey Scott, can you please take a look at this approach ? This doesn't work ...
6 years, 9 months ago (2014-03-06 15:50:34 UTC) #1
scottmg
+yukawa
6 years, 9 months ago (2014-03-06 17:16:35 UTC) #2
scottmg
I think this mostly looks as expected, but I'm not sure it'll work as well ...
6 years, 9 months ago (2014-03-06 18:39:28 UTC) #3
yukawa
On 2014/03/06 18:39:28, scottmg wrote: > I think this mostly looks as expected, but I'm ...
6 years, 9 months ago (2014-03-07 05:24:39 UTC) #4
yukawa
Oops, forgot to publish my inline comments. https://codereview.chromium.org/187813008/diff/100001/chrome/chrome_pgo.gypi File chrome/chrome_pgo.gypi (right): https://codereview.chromium.org/187813008/diff/100001/chrome/chrome_pgo.gypi#newcode14 chrome/chrome_pgo.gypi:14: 'type': 'none', ...
6 years, 9 months ago (2014-03-07 05:25:22 UTC) #5
yukawa
Ugh, I was in trouble due to http://crbug.com/350694 and couldn't test well but I had ...
6 years, 9 months ago (2014-03-10 04:12:39 UTC) #6
Sébastien Marchand
Hey, I've been able to optimize Chrome with PGO earlier this week, I've used the ...
6 years, 9 months ago (2014-03-10 04:46:46 UTC) #7
Sébastien Marchand
Here's another approach, please note that this doesn't work as is (see the error message ...
6 years, 9 months ago (2014-03-10 22:21:46 UTC) #8
scottmg
On 2014/03/10 22:21:46, Sébastien Marchand wrote: > Here's another approach, please note that this doesn't ...
6 years, 9 months ago (2014-03-11 03:30:29 UTC) #9
Sébastien Marchand
After a long fight with gyp it almost work... (almost=it seems to work but there's ...
6 years, 9 months ago (2014-03-12 22:40:40 UTC) #10
scottmg
Great! I think this is reasonable, if you can iron out the final problems. I ...
6 years, 9 months ago (2014-03-12 22:59:25 UTC) #11
yukawa
> After a long fight with gyp it almost work... > (almost=it seems to work ...
6 years, 9 months ago (2014-03-13 06:32:32 UTC) #12
Sébastien Marchand
I spoke too fast... :( Even though the ninja files looked okay I'm starting to ...
6 years, 9 months ago (2014-03-13 17:57:31 UTC) #13
scottmg
I'm beginning to wonder if this isn't worth the complexity... Another much simpler way (from ...
6 years, 9 months ago (2014-03-13 18:25:49 UTC) #14
Sébastien Marchand
I've abandoned the one-target approach, here's a simpler one (which require to build chrome_dll twice, ...
6 years, 9 months ago (2014-03-13 22:06:55 UTC) #15
scottmg
This LGTM. I think this is fine, and it might even be better to avoid ...
6 years, 9 months ago (2014-03-13 23:04:38 UTC) #16
Sébastien Marchand
Thanks, I've sent this to the trybots, if everything's green (or at least if it's ...
6 years, 9 months ago (2014-03-13 23:30:57 UTC) #17
Sébastien Marchand
The CQ bit was checked by sebmarchand@chromium.org
6 years, 9 months ago (2014-03-14 01:25:33 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sebmarchand@chromium.org/187813008/270001
6 years, 9 months ago (2014-03-14 01:26:37 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-14 01:49:01 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_rel
6 years, 9 months ago (2014-03-14 01:49:02 UTC) #21
Sébastien Marchand
The CQ bit was checked by sebmarchand@chromium.org
6 years, 9 months ago (2014-03-14 01:50:45 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sebmarchand@chromium.org/187813008/270001
6 years, 9 months ago (2014-03-14 01:51:59 UTC) #23
yukawa
LGTM for starting from hacky but much simpler 2 pass build. Build is hard.
6 years, 9 months ago (2014-03-14 01:58:01 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-14 02:17:35 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_chromium_rel
6 years, 9 months ago (2014-03-14 02:17:36 UTC) #26
Sébastien Marchand
The CQ bit was checked by sebmarchand@chromium.org
6 years, 9 months ago (2014-03-14 02:19:50 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sebmarchand@chromium.org/187813008/270001
6 years, 9 months ago (2014-03-14 02:20:04 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-14 03:15:39 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 9 months ago (2014-03-14 03:15:40 UTC) #30
sebmarchand (DO NOT USE)
The CQ bit was checked by sebmarchand@google.com
6 years, 9 months ago (2014-03-14 03:17:49 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sebmarchand@chromium.org/187813008/270001
6 years, 9 months ago (2014-03-14 03:18:07 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-14 03:21:38 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_rel
6 years, 9 months ago (2014-03-14 03:21:39 UTC) #34
sebmarchand (DO NOT USE)
The CQ bit was checked by sebmarchand@google.com
6 years, 9 months ago (2014-03-14 03:48:22 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sebmarchand@chromium.org/187813008/270001
6 years, 9 months ago (2014-03-14 03:49:09 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-14 03:59:09 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_chromium_rel
6 years, 9 months ago (2014-03-14 03:59:10 UTC) #38
Sébastien Marchand
The CQ bit was checked by sebmarchand@chromium.org
6 years, 9 months ago (2014-03-14 13:02:19 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sebmarchand@chromium.org/187813008/270001
6 years, 9 months ago (2014-03-14 13:03:03 UTC) #40
commit-bot: I haz the power
6 years, 9 months ago (2014-03-14 16:48:32 UTC) #41
Message was sent while issue was closed.
Change committed as 257133

Powered by Google App Engine
This is Rietveld 408576698