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

Issue 119083006: Add tool to help analyze binary size (Closed)

Created:
6 years, 11 months ago by Andrew Hayden (chromium.org)
Modified:
6 years, 10 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add tool to help analyze binary size BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245405

Patch Set 1 #

Patch Set 2 : Add gyp file, fix missing "static" keyword #

Patch Set 3 : Break apart monolithic class into smaller units #

Patch Set 4 : Add necessary gypii/py files for running tool #

Patch Set 5 : remove unused run_cwd arg #

Patch Set 6 : use a python script instead of gyp #

Patch Set 7 : make sure to copy license file from webtreemap #

Patch Set 8 : Add android-x86 support and fix regexes for modern addr2line #

Patch Set 9 : Fix --arch bug, add target to all_android.gyp #

Patch Set 10 : remove extraneous comment from buildfile #

Total comments: 45

Patch Set 11 : Marcus's comments #

Patch Set 12 : Added top-100 largest symbols report #

Patch Set 13 : Allow choosing what to see in the report index.html #

Patch Set 14 : Add largest-sources report #

Patch Set 15 : Don't hyperlink sources from the out directories #

Patch Set 16 : Remove unnecessary threadsafety from Record.java #

Total comments: 93

Patch Set 17 : comments from beverloo@ and bulach@ #

Patch Set 18 : Formatting ONLY. #

Patch Set 19 : Fix minor bug with zip download and dir creation #

Patch Set 20 : Fix weird gyp/gn/ninja problem #

Patch Set 21 : Improve jsonification and spatial map, add vtables report #

Patch Set 22 : shrink text inputs #

Patch Set 23 : avoid indenting tree dump, saving 5 megs in contentshell report #

Patch Set 24 : Add chromium notice to index.html #

Total comments: 28

Patch Set 25 : Remove problematic OSS, add README #

Patch Set 26 : Output usage message in Java, fix oversight in python script #

Patch Set 27 : Address comments from Marcus #

Patch Set 28 : Switch to webtreemap in third_party #

Total comments: 1

Patch Set 29 : Trivial text update to README.txt #

Total comments: 7

Patch Set 30 : <ol> -> <ul> for README.txt shortcomings list #

Total comments: 1

Patch Set 31 : ORDERED LISTS SHOULD BE ILLEGAL #

Patch Set 32 : Marcus' comments #

Total comments: 3

Patch Set 33 : Rebase onto master for a clean commit of gyp change #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2022 lines, -0 lines) Patch
M build/all_android.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
A tools/binary_size/README.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +117 lines, -0 lines 0 comments Download
A tools/binary_size/binary_size.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +16 lines, -0 lines 0 comments Download
A tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +467 lines, -0 lines 0 comments Download
A tools/binary_size/java/src/org/chromium/tools/binary_size/NmDumper.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +161 lines, -0 lines 0 comments Download
A tools/binary_size/java/src/org/chromium/tools/binary_size/ParallelAddress2Line.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +526 lines, -0 lines 0 comments Download
A tools/binary_size/java/src/org/chromium/tools/binary_size/Record.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +45 lines, -0 lines 0 comments Download
A tools/binary_size/run_binary_size_analysis.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +491 lines, -0 lines 1 comment Download
A tools/binary_size/template/.gitignore View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A tools/binary_size/template/index.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +190 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
andrewhayden
So, this is now at a point where I'd consider it sufficient for an initial ...
6 years, 11 months ago (2014-01-06 23:40:13 UTC) #1
bulach
nice!! I have a few general comments below, and yeah, I suppose in python this ...
6 years, 11 months ago (2014-01-07 19:38:30 UTC) #2
Andrew Hayden (chromium.org)
Addressing all comments... https://codereview.chromium.org/119083006/diff/230001/tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java File tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java (right): https://codereview.chromium.org/119083006/diff/230001/tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java#newcode38 tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java:38: private final ConcurrentHashMap<Integer, Record> addressesSeen = ...
6 years, 11 months ago (2014-01-08 00:56:44 UTC) #3
Torne
I'm also very skeptical about the use of volatile here; my rule of thumb for ...
6 years, 11 months ago (2014-01-08 11:51:39 UTC) #4
Andrew Hayden (chromium.org)
On 2014/01/08 11:51:39, Torne wrote: > I'm also very skeptical about the use of volatile ...
6 years, 11 months ago (2014-01-08 11:59:04 UTC) #5
Andrew Hayden (chromium.org)
Volatiles removed, and I re-ran the tool. With 310,000 records processed without error on my ...
6 years, 11 months ago (2014-01-08 12:21:44 UTC) #6
bulach
getting there, thanks!! I now focused on the python file which I haven't looked before: ...
6 years, 11 months ago (2014-01-08 15:03:59 UTC) #7
Peter Beverloo
First two files done (also w/ Marcus' comments). Time for a meeting :-). https://codereview.chromium.org/119083006/diff/410001/tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java File ...
6 years, 11 months ago (2014-01-08 16:06:23 UTC) #8
Andrew Hayden (chromium.org)
https://codereview.chromium.org/119083006/diff/410001/tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java File tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java (right): https://codereview.chromium.org/119083006/diff/410001/tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java#newcode30 tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java:30: private final Addr2LineWorker[] workers; On 2014/01/08 16:06:23, Peter Beverloo ...
6 years, 11 months ago (2014-01-08 21:04:09 UTC) #9
Andrew Hayden (chromium.org)
For my next trick, formatting the python and java code to meet Chromium coding standards. ...
6 years, 11 months ago (2014-01-08 21:09:00 UTC) #10
Andrew Hayden (chromium.org)
Ready for re-review. All presubmit warnings fixed, and Python/Java code adhere to Chromium standards.
6 years, 11 months ago (2014-01-08 22:54:16 UTC) #11
Andrew Hayden (chromium.org)
I have sent mail to both security and open source reviewers about the use of ...
6 years, 11 months ago (2014-01-08 23:43:54 UTC) #12
bulach
lgtm, the remaining comments are just nits, feel free to land once you have third ...
6 years, 11 months ago (2014-01-10 11:23:23 UTC) #13
dshwang
it's cool. it looks not-android-specific. Do you have plan to support other platforms, especially linux?
6 years, 11 months ago (2014-01-10 14:04:30 UTC) #14
Andrew Hayden (chromium.org)
On 2014/01/10 14:04:30, dshwang wrote: > it's cool. it looks not-android-specific. Do you have plan ...
6 years, 11 months ago (2014-01-10 14:09:53 UTC) #15
Andrew Hayden (chromium.org)
For posterity, there is a demo of the current functionality posted here: http://andrewhayden.github.io/binary_size_example/
6 years, 11 months ago (2014-01-10 14:57:45 UTC) #16
Andrew Hayden (chromium.org)
Here the the review for checking in webtreemap, which I expect to land later today: ...
6 years, 11 months ago (2014-01-16 11:24:34 UTC) #17
Andrew Hayden (chromium.org)
Responses to Marcus https://codereview.chromium.org/119083006/diff/710001/tools/binary_size/run_binary_size_analysis.py File tools/binary_size/run_binary_size_analysis.py (right): https://codereview.chromium.org/119083006/diff/710001/tools/binary_size/run_binary_size_analysis.py#newcode23 tools/binary_size/run_binary_size_analysis.py:23: On 2014/01/10 11:23:24, bulach wrote: > ...
6 years, 11 months ago (2014-01-16 14:26:48 UTC) #18
Andrew Hayden (chromium.org)
With the advent of patchset 28, I now consider v1.0 of this tool complete and ...
6 years, 11 months ago (2014-01-16 14:46:54 UTC) #19
Andrew Hayden (chromium.org)
https://codereview.chromium.org/119083006/diff/940001/tools/binary_size/README.txt File tools/binary_size/README.txt (right): https://codereview.chromium.org/119083006/diff/940001/tools/binary_size/README.txt#newcode105 tools/binary_size/README.txt:105: 6. The Javascript code in the HTML report Assumes ...
6 years, 11 months ago (2014-01-16 14:54:27 UTC) #20
Andrew Hayden (chromium.org)
https://codereview.chromium.org/119083006/diff/1000001/tools/binary_size/README.txt File tools/binary_size/README.txt (right): https://codereview.chromium.org/119083006/diff/1000001/tools/binary_size/README.txt#newcode110 tools/binary_size/README.txt:110: 4. Feature Requests and Bug Reports Gah.
6 years, 11 months ago (2014-01-16 14:56:57 UTC) #21
bulach
lgtm, just tiny nits, thanks! https://codereview.chromium.org/119083006/diff/920001/tools/binary_size/java/src/org/chromium/tools/binary_size/NmDumper.java File tools/binary_size/java/src/org/chromium/tools/binary_size/NmDumper.java (right): https://codereview.chromium.org/119083006/diff/920001/tools/binary_size/java/src/org/chromium/tools/binary_size/NmDumper.java#newcode148 tools/binary_size/java/src/org/chromium/tools/binary_size/NmDumper.java:148: writer.flush(); } nit: } ...
6 years, 11 months ago (2014-01-16 15:01:58 UTC) #22
Andrew Hayden (chromium.org)
https://codereview.chromium.org/119083006/diff/940001/tools/binary_size/run_binary_size_analysis.py File tools/binary_size/run_binary_size_analysis.py (right): https://codereview.chromium.org/119083006/diff/940001/tools/binary_size/run_binary_size_analysis.py#newcode155 tools/binary_size/run_binary_size_analysis.py:155: elif 'r' == type or 'R' == type: On ...
6 years, 11 months ago (2014-01-16 15:12:59 UTC) #23
Andrew Hayden (chromium.org)
https://codereview.chromium.org/119083006/diff/1060001/tools/binary_size/README.txt File tools/binary_size/README.txt (right): https://codereview.chromium.org/119083006/diff/1060001/tools/binary_size/README.txt#newcode54 tools/binary_size/README.txt:54: producing an HTMl report in /tmp/report: The 'L' in ...
6 years, 11 months ago (2014-01-16 16:11:38 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/andrewhayden@chromium.org/119083006/1100001
6 years, 11 months ago (2014-01-16 22:41:04 UTC) #25
commit-bot: I haz the power
Change committed as 245405
6 years, 11 months ago (2014-01-17 01:09:28 UTC) #26
Andrew Hayden (chromium.org)
https://codereview.chromium.org/119083006/diff/1100001/tools/binary_size/run_binary_size_analysis.py File tools/binary_size/run_binary_size_analysis.py (right): https://codereview.chromium.org/119083006/diff/1100001/tools/binary_size/run_binary_size_analysis.py#newcode480 tools/binary_size/run_binary_size_analysis.py:480: 'webtreemap-gh-pages') Whoops, this is desynced from the final approach ...
6 years, 11 months ago (2014-01-17 01:27:41 UTC) #27
Nico
Hi, why was this written in Java? We usually do tooling stuff in python.
6 years, 10 months ago (2014-01-29 03:33:17 UTC) #28
Miguel Garcia
On 2014/01/29 03:33:17, Nico wrote: > Hi, > > why was this written in Java? ...
6 years, 10 months ago (2014-01-29 09:08:02 UTC) #29
Andrew Hayden (chromium.org)
On 2014/01/29 09:08:02, Miguel Garcia wrote: > Indeed, the tool was written in the downstream ...
6 years, 10 months ago (2014-01-29 10:42:32 UTC) #30
Nico
6 years, 10 months ago (2014-01-29 16:11:09 UTC) #31
Cool, thanks for explaining!


On Wed, Jan 29, 2014 at 2:42 AM, <andrewhayden@chromium.org> wrote:

> On 2014/01/29 09:08:02, Miguel Garcia wrote:
>
>> Indeed, the tool was written in the downstream repository for android
>> only,
>> which is why it used java initially. Andrew will be porting it to python
>> so it
>> can be used in other platforms as well but we thought it'd be a good idea
>> to
>> upstream it as is so opera and other folks can start using it on their
>>
> binaries.
>
>  Andrew is there a bug to port it to python?
>>
>
> There is now:
> https://code.google.com/p/chromium/issues/detail?id=339059
>
> https://codereview.chromium.org/119083006/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698