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 258633003: Graphical version of the run_binary_size_analysis tool. (Closed)

Created:
6 years, 8 months ago by Daniel Bratell
Modified:
6 years, 7 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Graphical version of the run_binary_size_analysis tool. The binary_size tool suit includes tools that are useful when trying to reduce binary size of a program, and chromium related programs in particular. This commit (mostly written by andrewhayden@chromium.org for Android but ported to generic Linux by bratell@opera.com) adds a graphical HTML based output for run_binary_size_analysis.py. In the generated web page it is possible to dynamically and graphically browse the binary and each part of the source tree is given a size that reflects its contribution to the binary size. The run_binary_size_analysis tool is run on compiled binaries with symbols and uses nm and addr2line to map parts of the binary to source code. Since addr2line is slow the operation to map binary symbols to source files takes a while but the output is well worth it when shrinking programs. See its usage information for details about how to run it. This commit also includes the tool explain_binary_size_delta.py (textual output) which can be used to understand why a binary changed size and in what way. See its usage information for details about how to run it. There are many further improvements possible to to do on these tools. Search the bug database for Label:Tools-BinarySize for suggestions. BUG=339059 R=primiano@chromium.org,andrewhayden@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272255

Patch Set 1 #

Patch Set 2 : Fixes to last patch set and some more 64 bit support. #

Patch Set 3 : typo #

Patch Set 4 : Using the python addr2line wrapper. #

Total comments: 45

Patch Set 5 : Rebased to newer master. #

Patch Set 6 : Addressed review concerns #

Total comments: 2

Patch Set 7 : After more review comments. #

Patch Set 8 : Remove the build system for the java pieces. #

Patch Set 9 : Delete build_size.jar on bots. #

Patch Set 10 : Made the code fully pylint clean. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+752 lines, -1400 lines) Patch
M build/all.gyp View 1 2 3 4 5 6 7 1 chunk +0 lines, -8 lines 0 comments Download
M build/android/findbugs_filter/findbugs_known_bugs.txt View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M build/android/pylib/symbols/elf_symbolizer.py View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M build/get_landmines.py View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
D tools/binary_size/binary_size.gyp View 1 2 3 4 5 6 7 1 chunk +0 lines, -16 lines 0 comments Download
A tools/binary_size/binary_size_utils.py View 1 2 3 4 5 1 chunk +65 lines, -0 lines 0 comments Download
A tools/binary_size/explain_binary_size_delta.py View 1 2 3 4 5 1 chunk +405 lines, -0 lines 0 comments Download
D tools/binary_size/java/src/org/chromium/tools/binary_size/Addr2LineWorkerPool.java View 1 2 3 1 chunk +0 lines, -469 lines 0 comments Download
D tools/binary_size/java/src/org/chromium/tools/binary_size/NmDumper.java View 1 2 3 1 chunk +0 lines, -166 lines 0 comments Download
M tools/binary_size/java/src/org/chromium/tools/binary_size/ParallelAddress2Line.java View 1 2 3 1 chunk +0 lines, -526 lines 0 comments Download
D tools/binary_size/java/src/org/chromium/tools/binary_size/Record.java View 1 2 3 1 chunk +0 lines, -45 lines 0 comments Download
M tools/binary_size/run_binary_size_analysis.py View 1 2 3 4 5 6 7 8 9 17 chunks +279 lines, -167 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Daniel Bratell
6 years, 8 months ago (2014-04-25 09:28:07 UTC) #1
Daniel Bratell
I think it might be time to get this into the chromium tree rather than ...
6 years, 7 months ago (2014-05-20 13:26:40 UTC) #2
Andrew Hayden (chromium.org)
Agreed, and a HUGE thanks for doing the work to clean up the Java code. ...
6 years, 7 months ago (2014-05-20 15:10:50 UTC) #3
Primiano Tucci (use gerrit)
Not very familiar with the binary_size stuff, but some python-related drive-by. Note: I'd move the ...
6 years, 7 months ago (2014-05-20 15:22:53 UTC) #4
Primiano Tucci (use gerrit)
Ah, also please mind the commit message! "Random changes to make binary_size run for me" ...
6 years, 7 months ago (2014-05-20 16:20:23 UTC) #5
Daniel Bratell
Updated source and commented on comments. Please take another look to see that I didn't ...
6 years, 7 months ago (2014-05-21 08:42:12 UTC) #6
Andrew Hayden (chromium.org)
Another change I plan to make, but that can wait a bit, is to rename ...
6 years, 7 months ago (2014-05-21 08:59:57 UTC) #7
Primiano Tucci (use gerrit)
Note that you have lint wargnings. Yet another reason for having a PRESUBMIT.py (see my ...
6 years, 7 months ago (2014-05-21 10:05:59 UTC) #8
Primiano Tucci (use gerrit)
Also a note on the commit message (sorry for the double mail) Please note that ...
6 years, 7 months ago (2014-05-21 10:21:17 UTC) #9
Daniel Bratell
On 2014/05/21 10:05:59, Primiano Tucci wrote: > Note that you have lint wargnings. There are ...
6 years, 7 months ago (2014-05-21 13:52:58 UTC) #10
Andrew Hayden (chromium.org)
> > by me to generic Linux. > > > > We have git blame ...
6 years, 7 months ago (2014-05-21 14:47:37 UTC) #11
Andrew Hayden (chromium.org)
Oh! One more thing! You should delete the binary_size_tool entry from the gyp file: https://code.google.com/p/chromium/codesearch#chromium/src/build/all.gyp&q=binary_size_tool&sq=package:chromium&type=cs&l=821
6 years, 7 months ago (2014-05-21 14:48:43 UTC) #12
Daniel Bratell
On 2014/05/21 14:48:43, Andrew Hayden wrote: > Oh! > > One more thing! > > ...
6 years, 7 months ago (2014-05-21 16:48:23 UTC) #13
Andrew Hayden (chromium.org)
Ah, good, you got the known_bugs as well. I had forgotten there was still one ...
6 years, 7 months ago (2014-05-21 17:39:56 UTC) #14
Primiano Tucci (use gerrit)
> Moved to a different CL. Thanks. > > Hmm this naming is confusing. > ...
6 years, 7 months ago (2014-05-21 18:08:39 UTC) #15
Daniel Bratell
On 2014/05/21 18:08:39, Primiano Tucci wrote: > In general, when it comes to technical discussions ...
6 years, 7 months ago (2014-05-21 22:10:16 UTC) #16
Daniel Bratell
The CQ bit was checked by bratell@opera.com
6 years, 7 months ago (2014-05-22 14:26:31 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bratell@opera.com/258633003/180001
6 years, 7 months ago (2014-05-22 14:27:49 UTC) #18
commit-bot: I haz the power
6 years, 7 months ago (2014-05-22 18:49:42 UTC) #19
Message was sent while issue was closed.
Change committed as 272255

Powered by Google App Engine
This is Rietveld 408576698