rework optimize configs in GN builds |
|||||
Issue descriptionCurrently we have multiple configs for selecting different optimization levels in //build/config/compiler/BUILD.gn, but it's hard to use them correctly. For example, "optimize_max" doesn't actually use the maximum possible optimizations in some cases; in most cases on posix systems we use -O2 instead of -O3. Another example is that "optimize_max" can enable whole-program (aka link-time) optimization, but it's unclear what that would mean if some components enable this and some don't. The whole approach probably needs to be re-evaluated.
,
Jun 19 2016
,
Jun 19 2016
Mixing-up LTO and non-LTO compile units might cause the link-time optimizer to infer wrong conclusion that some class hierarchies with internal visibility are smaller than they are (since it won't see them in the native object files from non-LTO compilation units), and then generate invalid vtables and/or virtual calls. That certainly depends on the real flags passed to a compiler, and Peter might correct / extend my examples.
,
Jun 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c266bec7641b1926f65d1f48614aafb2008a7c57 commit c266bec7641b1926f65d1f48614aafb2008a7c57 Author: dpranke <dpranke@chromium.org> Date: Mon Jun 20 23:22:34 2016 Add a dedicated "optimize_speed" config to GN. The various GN configs to select different optimization levels are confusing, and sorting them out will take a decent amount of perf testing, but in order to achieve parity w/ GYP, for now we need a dedicated config to make sure some components (e.g., v8) are compiled w/ -O3 where appropriate. R=brettw@chromium.org, machenbach@chromium.org BUG= 616031 , 618678, 621335 Review-Url: https://codereview.chromium.org/2078223002 Cr-Commit-Position: refs/heads/master@{#400828} [modify] https://crrev.com/c266bec7641b1926f65d1f48614aafb2008a7c57/build/config/compiler/BUILD.gn [modify] https://crrev.com/c266bec7641b1926f65d1f48614aafb2008a7c57/third_party/opus/BUILD.gn
,
Jul 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2bb3c4f7a7c7632afe1b63a19d49daa61bbfc37b commit 2bb3c4f7a7c7632afe1b63a19d49daa61bbfc37b Author: huapengl <huapengl@amazon.com> Date: Tue Jul 19 17:19:10 2016 Use "-Os" for Android or IOS in "optimize_max" config Using "-Os" would benefit both Android and IOS build, because "-Os" does "-O2" optimizations and code size improvement. libchrome.so drops from 44MB to 42 MB. ChromePublic.apk drops from 47 MB to 45 MB. BUG=621335 Review-Url: https://codereview.chromium.org/2158053002 Cr-Commit-Position: refs/heads/master@{#406304} [modify] https://crrev.com/2bb3c4f7a7c7632afe1b63a19d49daa61bbfc37b/build/config/compiler/BUILD.gn
,
Jul 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8f5987c15bd03c5da97aa27103d36c5943e78259 commit 8f5987c15bd03c5da97aa27103d36c5943e78259 Author: huapengl <huapengl@amazon.com> Date: Wed Jul 20 16:08:49 2016 Revert of Use "-Os" for Android or IOS in "optimize_max" config (patchset #1 id:1 of https://codereview.chromium.org/2158053002/ ) Reason for revert: 8.1% regression in speedometer at 406285:406306 https://bugs.chromium.org/p/chromium/issues/detail?id=629798#c4 Original issue's description: > Use "-Os" for Android or IOS in "optimize_max" config > > Using "-Os" would benefit both Android and IOS build, because "-Os" does > "-O2" optimizations and code size improvement. > > libchrome.so drops from 44MB to 42 MB. > ChromePublic.apk drops from 47 MB to 45 MB. > > BUG=621335 > > Committed: https://crrev.com/2bb3c4f7a7c7632afe1b63a19d49daa61bbfc37b > Cr-Commit-Position: refs/heads/master@{#406304} TBR=dpranke@chromium.org,sdefresne@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=621335 Review-Url: https://codereview.chromium.org/2164973002 Cr-Commit-Position: refs/heads/master@{#406569} [modify] https://crrev.com/8f5987c15bd03c5da97aa27103d36c5943e78259/build/config/compiler/BUILD.gn
,
Jul 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8f5987c15bd03c5da97aa27103d36c5943e78259 commit 8f5987c15bd03c5da97aa27103d36c5943e78259 Author: huapengl <huapengl@amazon.com> Date: Wed Jul 20 16:08:49 2016 Revert of Use "-Os" for Android or IOS in "optimize_max" config (patchset #1 id:1 of https://codereview.chromium.org/2158053002/ ) Reason for revert: 8.1% regression in speedometer at 406285:406306 https://bugs.chromium.org/p/chromium/issues/detail?id=629798#c4 Original issue's description: > Use "-Os" for Android or IOS in "optimize_max" config > > Using "-Os" would benefit both Android and IOS build, because "-Os" does > "-O2" optimizations and code size improvement. > > libchrome.so drops from 44MB to 42 MB. > ChromePublic.apk drops from 47 MB to 45 MB. > > BUG=621335 > > Committed: https://crrev.com/2bb3c4f7a7c7632afe1b63a19d49daa61bbfc37b > Cr-Commit-Position: refs/heads/master@{#406304} TBR=dpranke@chromium.org,sdefresne@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=621335 Review-Url: https://codereview.chromium.org/2164973002 Cr-Commit-Position: refs/heads/master@{#406569} [modify] https://crrev.com/8f5987c15bd03c5da97aa27103d36c5943e78259/build/config/compiler/BUILD.gn
,
Jul 25 2016
Just FYI: This commit + revert also coincides with a ~1-2MB drop in memory usage (overall pss). After the revert memory measurements appear to have returned to their baseline: https://chromeperf.appspot.com/report?sid=299508ce2a28f86977fc0a89ee4b11c396b6abd6543aaec28f0ed77a4dbc63cf&start_rev=406005&end_rev=406744
,
Jul 25 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dpranke@chromium.org
, Jun 19 2016