New issue
Advanced search Search tips

Issue 710461 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocking:
issue 717550



Sign in to add a comment

map2size.py seems to be broken on Linux

Project Member Reported by raphael....@intel.com, Apr 11 2017

Issue description

From https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/ttPKLJZ1YoQ:

//tools/binary_size/README.md contains a list of steps for running map2size.py on Linux, but they do not seem to be up-to-date. I'm more than glad to update the instructions, but I first need to figure out what the actual sequence of steps should be.

- The default official build seems to need the LLVM gold plugin, which is downloaded only if the LLVM_DOWNLOAD_GOLD_PLUGIN environment variable is set when "gclient runhooks" is run).
- LTO seems to break map2size, as it errors out with an error message like "Could not find source path for /tmp/lto-llvm-9728ef.o"
- Disabling LTO then leads to problems with the chroot:
  Could not find source path for /data/src/chromium/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu/libc_nonshared.a(elf-init.oS) 
  Could not find source path for /data/src/chromium/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu/libc_nonshared.a(atexit.oS) 
  Could not find source path for /data/src/chromium/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu/libc_nonshared.a(stat64.oS) 
  Could not find source path for /data/src/chromium/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu/libc_nonshared.a(fstat64.oS) 
  Could not find source path for /data/src/chromium/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu/libc_nonshared.a(lstat64.oS)
 
Cc: -agrieve@chromium.org
Owner: agrieve@chromium.org
The LLVM_DOWNLOAD_GOLD_PLUGIN thing is supposed to be going away "any time now", but agree we should add it to the docs for now.

The source path errors is just a bug in the tool.
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 12 2017

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

commit c666c641ced98002aeb38515fe44f722b3714201
Author: agrieve <agrieve@chromium.org>
Date: Wed Apr 12 20:44:37 2017

//tools/binary_size: Fix source paths for linux builds

And update README.md example to mention LLVM_DOWNLOAD_GOLD_PLUGIN.

BUG= 681694 , 710461 

Review-Url: https://codereview.chromium.org/2817553003
Cr-Commit-Position: refs/heads/master@{#464141}

[modify] https://crrev.com/c666c641ced98002aeb38515fe44f722b3714201/tools/binary_size/README.md
[modify] https://crrev.com/c666c641ced98002aeb38515fe44f722b3714201/tools/binary_size/libsupersize/archive.py

Status: Fixed (was: Available)
Tried to run tools/binary_size/supersize archive today on a linux checkout and got this:
Traceback (most recent call last):
  File "tools/binary_size/libsupersize/main.py", line 103, in <module>
    sys.exit(main())
  File "tools/binary_size/libsupersize/main.py", line 99, in main
    args.func(args, parser)
  File "/usr/local/google/code/clankium-linux/chromium/src/tools/binary_size/libsupersize/archive.py", line 538, in Run
    map_path, lazy_paths, no_source_paths=args.no_source_paths, raw_only=True)
  File "/usr/local/google/code/clankium-linux/chromium/src/tools/binary_size/libsupersize/archive.py", line 352, in CreateSizeInfo
    linker_map_parser.MapFileParser().Parse(map_file))
  File "/usr/local/google/code/clankium-linux/chromium/src/tools/binary_size/libsupersize/linker_map_parser.py", line 31, in Parse
    self._ParseCommonSymbols()
  File "/usr/local/google/code/clankium-linux/chromium/src/tools/binary_size/libsupersize/linker_map_parser.py", line 60, in _ParseCommonSymbols
    next(self._lines)  # Skip past blank line
StopIteration

chrome.map.gz doesn't even seem to contain "Common symbol".

This is on a Linux checkout with args.gn:
is_official_build = true
symbol_level = 1
use_goma = true
target_os = "linux"
exclude_unwind_tables = true
ffmpeg_branding = "Chrome"
proprietary_codecs = true
Blocking: 717550
Labels: -binary-size Performance-Size

Sign in to add a comment