Chromium Code Reviews| 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() |