New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 848731 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

supersize console's Disassemble() is broken

Project Member Reported by agrieve@chromium.org, Jun 1 2018

Issue description

x = size_info.symbols.WherePathMatches('ui_scene_creator')
Disassemble(x[0])

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/google/code/clankium/src/tools/binary_size/libsupersize/console.py", line 302, in _DisassembleFunc
    tool_prefix = self._ToolPrefixForSymbol(size_info)
  File "/usr/local/google/code/clankium/src/tools/binary_size/libsupersize/console.py", line 207, in _ToolPrefixForSymbol
    tool_prefix = self._tool_prefix_finder.Tentative()
  File "/usr/local/google/code/clankium/src/tools/binary_size/libsupersize/path_util.py", line 38, in Tentative
    self._value = self.Detect()
  File "/usr/local/google/code/clankium/src/tools/binary_size/libsupersize/path_util.py", line 92, in Detect
    if self._linker_name.startswith('lld'):
 

Comment 1 by bshe@chromium.org, Jun 1 2018

More information, I did change path_util.py by replace "  if self._linker_name.startswith('lld'):" with "if True:"
I hit another error message that complains about --demangle is not a valid flag for third_party/llvm-build/Release+Asserts/bin/llvm-objdump. I am not sure if it triggered by my change or a separate bug. Just want to report here.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4bcf50a6da995e67d62596a71533a85a5d63347c

commit 4bcf50a6da995e67d62596a71533a85a5d63347c
Author: Samuel Huang <huangs@chromium.org>
Date: Sat Jun 02 03:38:42 2018

[Supersize] Fix Disassemble() and store linker_name in metadata.

Disassemble() previously fails because in Supersize Console,
ToolPrefixFinder has linker_name = None. However, in Supersize Archive,
linker_name is parsed from the .map file. So to make it available for
Supersize Console, we should store it in as metadata in the .size file.
It was then discovered that llvm-objdump does not support the
'--demangle' option. So, ToolPrefixFinder.IsLld() is added, and we
exclude '--demangle' for LLD.

Bug:  848731 
Change-Id: Ie16110d8f36b84b146150373f1a699597b98f4f7
Reviewed-on: https://chromium-review.googlesource.com/1081895
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563923}
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/archive.py
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/console.py
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/integration_test.py
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/models.py
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/path_util.py
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/testdata/Archive_Apk.golden
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/testdata/Archive_Elf.golden
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/testdata/Archive_Pak_Files.golden
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/testdata/Console.golden
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/testdata/Diff_NullDiff.golden
[modify] https://crrev.com/4bcf50a6da995e67d62596a71533a85a5d63347c/tools/binary_size/libsupersize/testdata/FullDescription.golden

Comment 3 by huangs@google.com, Jun 11 2018

Status: Fixed (was: Available)

Sign in to add a comment