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

Unified Diff: tools/binary_size/run_binary_size_analysis.py

Issue 397593007: Handle shared memory symbols better in the binarysize tool. (Closed)
Patch Set: Shared symbols: Rebased to newer master. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/binary_size/run_binary_size_analysis.py
diff --git a/tools/binary_size/run_binary_size_analysis.py b/tools/binary_size/run_binary_size_analysis.py
index c218effa764a7139285801df6be9dd8b4e2e7d9a..9a75c6cceac529791a3e56efd7edef828625180b 100755
--- a/tools/binary_size/run_binary_size_analysis.py
+++ b/tools/binary_size/run_binary_size_analysis.py
@@ -169,7 +169,7 @@ def MakeCompactTree(symbols, symbol_path_origin_dir):
NODE_MAX_DEPTH_KEY: 0}
seen_symbol_with_path = False
cwd = os.path.abspath(os.getcwd())
- for symbol_name, symbol_type, symbol_size, file_path in symbols:
+ for symbol_name, symbol_type, symbol_size, file_path, _address in symbols:
if 'vtable for ' in symbol_name:
symbol_type = '@' # hack to categorize these separately
@@ -245,7 +245,7 @@ def TreeifySymbols(symbols):
leaf nodes within the data structure.
"""
dirs = {'children': {}, 'size': 0}
- for sym, symbol_type, size, path in symbols:
+ for sym, symbol_type, size, path, _address in symbols:
dirs['size'] += size
if path:
path = os.path.normpath(path)
@@ -382,7 +382,7 @@ def DumpLargestSymbols(symbols, outfile, n):
out = open(outfile, 'w')
try:
out.write('var largestSymbols = [\n')
- for sym, symbol_type, size, path in symbols:
+ for sym, symbol_type, size, path, _address in symbols:
if symbol_type in ('b', 'w'):
continue # skip bss and weak symbols
if path is None:
@@ -404,7 +404,7 @@ def DumpLargestSymbols(symbols, outfile, n):
def MakeSourceMap(symbols):
sources = {}
- for _sym, _symbol_type, size, path in symbols:
+ for _sym, _symbol_type, size, path, _address in symbols:
key = None
if path:
key = os.path.normpath(path)
@@ -444,7 +444,7 @@ def DumpLargestSources(symbols, outfile, n):
# TODO(andrewhayden): Only used for legacy reports. Delete.
def DumpLargestVTables(symbols, outfile, n):
vtables = []
- for symbol, _type, size, path in symbols:
+ for symbol, _type, size, path, _address in symbols:
if 'vtable for ' in symbol:
vtables.append({'symbol': symbol, 'path': path, 'size': size})
vtables = sorted(vtables, key=lambda x: -x['size'])

Powered by Google App Engine
This is Rietveld 408576698