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

Issue 2851473003: supersize: Track symbol aliases and shared symbols (Closed)

Created:
3 years, 7 months ago by agrieve
Modified:
3 years, 7 months ago
Reviewers:
estevenson
CC:
chromium-reviews, wnwen+watch_chromium.org, estevenson+watch_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

supersize: Track symbol aliases and shared symbols An alias is when multiple names map to the same symbol. This happens a lot with small member functions (e.g. getters), as well as with C++ templates. The .map file choses only one name for each symbol, but using nm we can recover the complete list. A shared symbol is one that exists in multiple .o files. The linker map picks one path to attribute the symbol to, but using nm we can recover the complete list of .o files containing the symbol. For aliases, each one is stored as a separate Symbol entry, and a new attribute "pss" returns size / num_aliases. For shared symbols, rather than storing all paths for a symbol, the paths are altered to be the common ancestor. E.g.: /a/b/c.o and /a/d/f.o --> /a/{shared}/2 (2 is the number of paths) For ChromePublic.apk: * 17717 symbols have shared ownership (991402 bytes) * Contains 83869 aliases, mapped to 9209 addresses (550582 bytes) BUG=708865 Review-Url: https://codereview.chromium.org/2851473003 Cr-Commit-Position: refs/heads/master@{#468362} Committed: https://chromium.googlesource.com/chromium/src/+/e2db5397b49842931f2f2a6b2c666c2a8892fd89

Patch Set 1 #

Patch Set 2 : tweak nm interfface #

Total comments: 12

Patch Set 3 : review comments #

Patch Set 4 : review comments #

Patch Set 5 : fix regression in calculate padding introduced in ps3 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2061 lines, -845 lines) Patch
M tools/binary_size/libsupersize/archive.py View 1 2 3 4 9 chunks +302 lines, -91 lines 0 comments Download
A tools/binary_size/libsupersize/concurrent.py View 1 1 chunk +210 lines, -0 lines 0 comments Download
M tools/binary_size/libsupersize/console.py View 2 chunks +2 lines, -1 line 0 comments Download
M tools/binary_size/libsupersize/describe.py View 1 2 6 chunks +45 lines, -29 lines 0 comments Download
A tools/binary_size/libsupersize/diff.py View 1 2 1 chunk +188 lines, -0 lines 0 comments Download
M tools/binary_size/libsupersize/file_format.py View 4 chunks +34 lines, -8 lines 0 comments Download
M tools/binary_size/libsupersize/helpers.py View 1 chunk +0 lines, -32 lines 0 comments Download
M tools/binary_size/libsupersize/html_report.py View 1 chunk +1 line, -1 line 0 comments Download
M tools/binary_size/libsupersize/integration_test.py View 1 2 4 chunks +159 lines, -51 lines 0 comments Download
M tools/binary_size/libsupersize/linker_map_parser.py View 8 chunks +23 lines, -11 lines 0 comments Download
M tools/binary_size/libsupersize/main.py View 1 chunk +1 line, -1 line 0 comments Download
M tools/binary_size/libsupersize/models.py View 1 14 chunks +73 lines, -105 lines 0 comments Download
M tools/binary_size/libsupersize/ninja_parser.py View 1 2 chunks +43 lines, -17 lines 0 comments Download
A tools/binary_size/libsupersize/nm.py View 1 2 1 chunk +236 lines, -0 lines 0 comments Download
M tools/binary_size/libsupersize/template/D3SymbolTreeMap.js View 1 chunk +1 line, -0 lines 0 comments Download
D tools/binary_size/libsupersize/testdata/ActualDiff.golden View 1 chunk +0 lines, -183 lines 0 comments Download
M tools/binary_size/libsupersize/testdata/Archive.golden View 1 2 1 chunk +56 lines, -44 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/Archive_Elf.golden View 1 2 1 chunk +68 lines, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/Archive_OutputDirectory.golden View 1 2 1 chunk +58 lines, -0 lines 0 comments Download
M tools/binary_size/libsupersize/testdata/Console.golden View 2 chunks +58 lines, -45 lines 0 comments Download
A + tools/binary_size/libsupersize/testdata/Diff_Basic.golden View 2 chunks +57 lines, -70 lines 0 comments Download
M tools/binary_size/libsupersize/testdata/Diff_NullDiff.golden View 2 chunks +10 lines, -3 lines 0 comments Download
M tools/binary_size/libsupersize/testdata/FullDescription.golden View 2 chunks +58 lines, -45 lines 0 comments Download
M tools/binary_size/libsupersize/testdata/SymbolGroupMethods.golden View 1 chunk +56 lines, -56 lines 0 comments Download
D tools/binary_size/libsupersize/testdata/build.ninja View 1 chunk +0 lines, -8 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/create-test-size.sh View 1 chunk +14 lines, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_output_directory/args.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A + tools/binary_size/libsupersize/testdata/mock_output_directory/build.ninja View 0 chunks +-1 lines, --1 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_output_directory/elf View 1 chunk +3 lines, -0 lines 0 comments Download
A + tools/binary_size/libsupersize/testdata/mock_output_directory/sub.ninja View 1 chunk +1 line, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_toolchain/c++filt View 1 chunk +7 lines, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_toolchain/git View 1 chunk +7 lines, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_toolchain/mock_cppfilt.py View 1 chunk +44 lines, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_toolchain/mock_git.py View 1 chunk +14 lines, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_toolchain/mock_nm.py View 1 chunk +121 lines, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_toolchain/mock_readelf.py View 1 chunk +93 lines, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_toolchain/nm View 1 chunk +7 lines, -0 lines 0 comments Download
A tools/binary_size/libsupersize/testdata/mock_toolchain/readelf View 1 chunk +7 lines, -0 lines 0 comments Download
D tools/binary_size/libsupersize/testdata/sub.ninja View 1 chunk +0 lines, -2 lines 0 comments Download
M tools/binary_size/libsupersize/testdata/test.map View 3 chunks +3 lines, -43 lines 0 comments Download

Messages

Total messages: 22 (12 generated)
agrieve
On 2017/04/27 18:44:49, agrieve wrote: > mailto:agrieve@chromium.org changed reviewers: > + mailto:estevenson@chromium.org 🚢
3 years, 7 months ago (2017-04-27 18:45:00 UTC) #3
estevenson
Sorry for the delay, lgtm https://codereview.chromium.org/2851473003/diff/20001/tools/binary_size/libsupersize/archive.py File tools/binary_size/libsupersize/archive.py (right): https://codereview.chromium.org/2851473003/diff/20001/tools/binary_size/libsupersize/archive.py#newcode62 tools/binary_size/libsupersize/archive.py:62: def _UnmangleNames(names, tool_prefix): revert ...
3 years, 7 months ago (2017-04-28 17:06:11 UTC) #4
agrieve
https://codereview.chromium.org/2851473003/diff/20001/tools/binary_size/libsupersize/archive.py File tools/binary_size/libsupersize/archive.py (right): https://codereview.chromium.org/2851473003/diff/20001/tools/binary_size/libsupersize/archive.py#newcode62 tools/binary_size/libsupersize/archive.py:62: def _UnmangleNames(names, tool_prefix): On 2017/04/28 17:06:11, estevenson wrote: > ...
3 years, 7 months ago (2017-04-28 19:26:59 UTC) #5
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/2851473003/40001
3 years, 7 months ago (2017-04-28 19:31:33 UTC) #8
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/2851473003/60001
3 years, 7 months ago (2017-04-28 19:53:39 UTC) #12
agrieve
On 2017/04/28 19:53:39, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
3 years, 7 months ago (2017-04-28 20:30:55 UTC) #14
estevenson
On 2017/04/28 20:30:55, agrieve wrote: > On 2017/04/28 19:53:39, commit-bot: I haz the power wrote: ...
3 years, 7 months ago (2017-04-28 20:34:08 UTC) #15
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/2851473003/80001
3 years, 7 months ago (2017-05-01 17:13:38 UTC) #18
agrieve
On 2017/04/28 20:34:08, estevenson wrote: > On 2017/04/28 20:30:55, agrieve wrote: > > On 2017/04/28 ...
3 years, 7 months ago (2017-05-01 17:14:04 UTC) #19
commit-bot: I haz the power
3 years, 7 months ago (2017-05-01 18:34:41 UTC) #22
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/e2db5397b49842931f2f2a6b2c66...

Powered by Google App Engine
This is Rietveld 408576698