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

Unified Diff: tools/binary_size/run_binary_size_analysis.py

Issue 303453003: binary_size: Easier-to-read output (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7647a22dcb69b351b429f0e6e35911dd39e1b8be..6f4ef64673d5a22b9c7483d0fe815597c25fbd54 100755
--- a/tools/binary_size/run_binary_size_analysis.py
+++ b/tools/binary_size/run_binary_size_analysis.py
@@ -88,13 +88,16 @@ def MakeChildrenDictsIntoLists(node):
def MakeCompactTree(symbols):
result = {'n': '/', 'children': {}, 'k': 'p', 'maxDepth': 0}
seen_symbol_with_path = False
+ cwd = os.path.abspath(os.getcwd())
for symbol_name, symbol_type, symbol_size, file_path in symbols:
if 'vtable for ' in symbol_name:
symbol_type = '@' # hack to categorize these separately
# Take path like '/foo/bar/baz', convert to ['foo', 'bar', 'baz']
- if file_path:
- file_path = os.path.normpath(file_path)
+ if file_path and file_path != "??":
Primiano Tucci (use gerrit) 2014/05/27 09:06:26 Please be consistent with quotes (we tend to use s
+ file_path = os.path.abspath(file_path)
Primiano Tucci (use gerrit) 2014/05/27 09:06:26 Lines 98-100 look like re-implementing python os.p
+ if file_path.startswith(cwd + os.sep):
+ file_path = file_path[len(cwd):]
seen_symbol_with_path = True
else:
file_path = '(No Path)'
@@ -434,6 +437,9 @@ def RunElfSymbolizer(outfile, library, addr2line_binary, nm_binary, jobs):
else:
address_symbol[addr] = symbol
+ progress_output()
+
+ def progress_output():
Primiano Tucci (use gerrit) 2014/05/27 09:06:26 Hmm what is the rationale of defining and calling
progress_chunk = 100
if progress.count % progress_chunk == 0:
time_now = time.time()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698