Commit 3e74902e authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[SuperSize] Allow .map file to be absent if --java-only is specified.

SuperSize uses .map file only for native code analysis. However,
previously it requires .map file always, even if native code analysis
is skipped (via --java-only). This CL removes the restriction: So when
using SuperSize to diagnoise Java size changes, one no longer needs to
specify "generate_linker_map = true" in args.gn.

Change-Id: I9cd36c16d4efe45fcee2ae7e6cea88511fa2b56c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2082895Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746041}
parent 473e58df
...@@ -1781,7 +1781,11 @@ def _DeduceMainPaths(args, parser, extracted_minimal_apk_path=None): ...@@ -1781,7 +1781,11 @@ def _DeduceMainPaths(args, parser, extracted_minimal_apk_path=None):
os.path.basename(apk_so_path.replace('crazy.', ''))) os.path.basename(apk_so_path.replace('crazy.', '')))
logging.debug('Detected --elf-file=%s', elf_path) logging.debug('Detected --elf-file=%s', elf_path)
if map_path: if args.java_only:
# Trust that these values will not be used, and set to None.
map_path = None
linker_name = None
elif map_path:
if not map_path.endswith('.map') and not map_path.endswith('.map.gz'): if not map_path.endswith('.map') and not map_path.endswith('.map.gz'):
parser.error('Expected --map-file to end with .map or .map.gz') parser.error('Expected --map-file to end with .map or .map.gz')
elif elf_path: elif elf_path:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment