Commit dbcf1b4e authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Supersize: Corelate pak symbols to source files

Use object_path and source_path from .o.whitelist files to find the
right paths for each pak symbol.

Refactor and generalize aliases/coalescing for all symbols.

Bug: 723672
Change-Id: I8a0385241ffc60334bee981a98566e46954884d7
Reviewed-on: https://chromium-review.googlesource.com/807147
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522120}
parent 12d3545c
This diff is collapsed.
...@@ -107,11 +107,15 @@ class IntegrationTest(unittest.TestCase): ...@@ -107,11 +107,15 @@ class IntegrationTest(unittest.TestCase):
if cache_key not in IntegrationTest.cached_size_info: if cache_key not in IntegrationTest.cached_size_info:
elf_path = _TEST_ELF_PATH if use_elf else None elf_path = _TEST_ELF_PATH if use_elf else None
output_directory = _TEST_OUTPUT_DIR if use_output_directory else None output_directory = _TEST_OUTPUT_DIR if use_output_directory else None
section_sizes, raw_symbols = archive.CreateSectionSizesAndSymbols(
_TEST_MAP_PATH, elf_path, _TEST_TOOL_PREFIX, output_directory)
if use_pak: if use_pak:
archive.AddPakSymbolsFromFiles( section_sizes, raw_symbols = archive.CreateSectionSizesAndSymbols(
section_sizes, raw_symbols, [_TEST_PAK_PATH], _TEST_PAK_INFO_PATH) map_path=_TEST_MAP_PATH, tool_prefix=_TEST_TOOL_PREFIX,
elf_path=elf_path, output_directory=output_directory,
pak_files=[_TEST_PAK_PATH], pak_info_file=_TEST_PAK_INFO_PATH)
else:
section_sizes, raw_symbols = archive.CreateSectionSizesAndSymbols(
map_path=_TEST_MAP_PATH, tool_prefix=_TEST_TOOL_PREFIX,
elf_path=elf_path, output_directory=output_directory)
metadata = None metadata = None
if use_elf: if use_elf:
with _AddMocksToPath(): with _AddMocksToPath():
......
...@@ -55,6 +55,9 @@ class _SourceMapper(object): ...@@ -55,6 +55,9 @@ class _SourceMapper(object):
def unmatched_paths_count(self): def unmatched_paths_count(self):
return len(self._unmatched_paths) return len(self._unmatched_paths)
def IterAllPaths(self):
return self._dep_map.iterkeys()
def _ParseNinjaPathList(path_list): def _ParseNinjaPathList(path_list):
ret = path_list.replace('\\ ', '\b') ret = path_list.replace('\\ ', '\b')
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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