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

Issue 2175413004: Enable whitelist generation for all builds. (Closed)

Created:
4 years, 4 months ago by estevenson
Modified:
4 years, 4 months ago
Reviewers:
Dirk Pranke, agrieve
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable whitelist generation for official builds. Currently, all resources are included in PAK files when Chrome is built locally. Only official_buildbot.sh uses a resource whitelist. This CL enables local builds to use resource whitelisting by setting the enable_resource_whitelist_generation gn flag to true, or by building an official build. This will allow developers to more easily monitor the changes in APK size for each commit they make. However, a large amount of output is generated (_pragma is used to create warnings to allow whitelisted resources to be listed), so for now the whitelist will only be generated for official builds. Comparison of ChromePublic.apk_InstallSize APK size using resource_sizes.py: * Local build with this patch: 73338275 bytes * Local build without this patch: 75248223 bytes BUG=632385 Committed: https://crrev.com/3f3fa5fc415baab5a875839e6520c2cbb245ec38 Cr-Commit-Position: refs/heads/master@{#409511}

Patch Set 1 #

Total comments: 59

Patch Set 2 : Addressed agrieve's comments and removed stderr filtering. #

Total comments: 18

Patch Set 3 : Enable whitelist generation for official builds. #

Total comments: 4

Patch Set 4 : Enable whitelist generation for official builds. #

Total comments: 2

Patch Set 5 : Enable whitelist generation for official builds. #

Patch Set 6 : rebase + change output dir #

Unified diffs Side-by-side diffs Delta from patch set Stats (+308 lines, -178 lines) Patch
M build/toolchain/gcc_ar_wrapper.py View 1 3 chunks +10 lines, -15 lines 0 comments Download
A build/toolchain/gcc_compile_wrapper.py View 1 2 1 chunk +44 lines, -0 lines 0 comments Download
M build/toolchain/gcc_solink_wrapper.py View 1 2 5 chunks +16 lines, -21 lines 0 comments Download
M build/toolchain/gcc_toolchain.gni View 1 2 3 4 5 6 chunks +33 lines, -2 lines 0 comments Download
A build/toolchain/wrapper_utils.py View 1 2 1 chunk +105 lines, -0 lines 0 comments Download
M chrome/BUILD.gn View 1 2 3 4 5 4 chunks +41 lines, -0 lines 0 comments Download
M chrome/chrome_repack_locales.gni View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M tools/grit/grit/format/data_pack.py View 1 4 chunks +12 lines, -5 lines 0 comments Download
M tools/grit/grit/format/repack.py View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M tools/grit/grit_rule.gni View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download
M tools/grit/repack.gni View 1 2 2 chunks +6 lines, -10 lines 0 comments Download
D tools/resources/find_used_resources.py View 1 chunk +0 lines, -89 lines 0 comments Download
A + tools/resources/generate_resource_whitelist.py View 1 5 chunks +25 lines, -32 lines 0 comments Download

Messages

Total messages: 30 (11 generated)
estevenson
4 years, 4 months ago (2016-07-27 00:25:11 UTC) #2
agrieve
https://codereview.chromium.org/2175413004/diff/1/build/toolchain/gcc_ar_wrapper.py File build/toolchain/gcc_ar_wrapper.py (right): https://codereview.chromium.org/2175413004/diff/1/build/toolchain/gcc_ar_wrapper.py#newcode2 build/toolchain/gcc_ar_wrapper.py:2: # Copyright 2016 The Chromium Authors. All rights reserved. ...
4 years, 4 months ago (2016-07-27 01:42:28 UTC) #3
estevenson
https://codereview.chromium.org/2175413004/diff/1/build/toolchain/gcc_ar_wrapper.py File build/toolchain/gcc_ar_wrapper.py (right): https://codereview.chromium.org/2175413004/diff/1/build/toolchain/gcc_ar_wrapper.py#newcode2 build/toolchain/gcc_ar_wrapper.py:2: # Copyright 2016 The Chromium Authors. All rights reserved. ...
4 years, 4 months ago (2016-07-28 21:56:46 UTC) #5
agrieve
just nits really. Looking good! https://codereview.chromium.org/2175413004/diff/20001/build/toolchain/gcc_compile_wrapper.py File build/toolchain/gcc_compile_wrapper.py (right): https://codereview.chromium.org/2175413004/diff/20001/build/toolchain/gcc_compile_wrapper.py#newcode34 build/toolchain/gcc_compile_wrapper.py:34: with open(args.resource_whitelist, 'w') as ...
4 years, 4 months ago (2016-07-29 01:55:21 UTC) #6
estevenson
https://codereview.chromium.org/2175413004/diff/20001/build/toolchain/gcc_compile_wrapper.py File build/toolchain/gcc_compile_wrapper.py (right): https://codereview.chromium.org/2175413004/diff/20001/build/toolchain/gcc_compile_wrapper.py#newcode34 build/toolchain/gcc_compile_wrapper.py:34: with open(args.resource_whitelist, 'w') as f: On 2016/07/29 01:55:21, agrieve ...
4 years, 4 months ago (2016-07-29 15:33:57 UTC) #7
agrieve
On 2016/07/29 15:33:57, estevenson1 wrote: > https://codereview.chromium.org/2175413004/diff/20001/build/toolchain/gcc_compile_wrapper.py > File build/toolchain/gcc_compile_wrapper.py (right): > > https://codereview.chromium.org/2175413004/diff/20001/build/toolchain/gcc_compile_wrapper.py#newcode34 > ...
4 years, 4 months ago (2016-07-29 15:44:24 UTC) #8
agrieve
Dirk - please take a look. Some alternatives discussed in the attached bug, and I ...
4 years, 4 months ago (2016-07-29 15:46:37 UTC) #10
Dirk Pranke
https://codereview.chromium.org/2175413004/diff/40001/tools/grit/grit_rule.gni File tools/grit/grit_rule.gni (right): https://codereview.chromium.org/2175413004/diff/40001/tools/grit/grit_rule.gni#newcode89 tools/grit/grit_rule.gni:89: enable_resource_whitelist_generation = is_official_build This should default to (is_android && ...
4 years, 4 months ago (2016-07-30 00:14:51 UTC) #15
estevenson
https://codereview.chromium.org/2175413004/diff/40001/tools/grit/grit_rule.gni File tools/grit/grit_rule.gni (right): https://codereview.chromium.org/2175413004/diff/40001/tools/grit/grit_rule.gni#newcode89 tools/grit/grit_rule.gni:89: enable_resource_whitelist_generation = is_official_build On 2016/07/30 00:14:51, Dirk Pranke wrote: ...
4 years, 4 months ago (2016-08-02 14:52:54 UTC) #16
Dirk Pranke
lgtm w/ nit. https://codereview.chromium.org/2175413004/diff/60001/tools/grit/grit_rule.gni File tools/grit/grit_rule.gni (right): https://codereview.chromium.org/2175413004/diff/60001/tools/grit/grit_rule.gni#newcode91 tools/grit/grit_rule.gni:91: "resource whitelist generation only works on ...
4 years, 4 months ago (2016-08-03 00:59:07 UTC) #17
estevenson
https://codereview.chromium.org/2175413004/diff/60001/tools/grit/grit_rule.gni File tools/grit/grit_rule.gni (right): https://codereview.chromium.org/2175413004/diff/60001/tools/grit/grit_rule.gni#newcode91 tools/grit/grit_rule.gni:91: "resource whitelist generation only works on android") On 2016/08/03 ...
4 years, 4 months ago (2016-08-03 13:51:14 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2175413004/80001
4 years, 4 months ago (2016-08-03 13:52:04 UTC) #21
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-03 14:55:26 UTC) #22
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/3f3fa5fc415baab5a875839e6520c2cbb245ec38 Cr-Commit-Position: refs/heads/master@{#409511}
4 years, 4 months ago (2016-08-03 14:56:57 UTC) #24
stevenjb
On 2016/08/03 14:56:57, commit-bot: I haz the power wrote: > Patchset 5 (id:??) landed as ...
4 years, 4 months ago (2016-08-03 16:42:50 UTC) #25
estevenson
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/2209763002/ by estevenson@chromium.org. ...
4 years, 4 months ago (2016-08-03 16:59:56 UTC) #26
estevenson
4 years, 4 months ago (2016-08-15 14:34:29 UTC) #28
stevenjb
On 2016/08/15 14:34:29, Eric Stevenson wrote: When I attempt to apply this patch I encounter ...
4 years, 4 months ago (2016-08-15 16:28:48 UTC) #29
stevenjb
4 years, 4 months ago (2016-08-15 16:39:55 UTC) #30
On 2016/08/15 16:28:48, stevenjb wrote:
> On 2016/08/15 14:34:29, Eric Stevenson wrote:
> 
> When I attempt to apply this patch I encounter two problems:
> 1. For generate_resource_whitelist.py I get "Cannot rename file without two
> valid file names". The CL shows that file as A+ whereas I do not see it in
ToT.
> Are you sure the patch is upstreamed correctly?
> 
> 2. I end up with a bunch of untracked files in third_party/swiftshader. I
> remember this caused a follow up CL adding third_party/swiftshader to
> .gitignore, but I'm not sure whether or not that was correct? I also recall
> there being headaches reverting this because of that. Can we check that we are
> doing all of the right things to convertin swiftshader to an external
> dependency?

Please ignore the previous comment, I got my CLs confused.

Powered by Google App Engine
This is Rietveld 408576698