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

Unified Diff: tools/binary_size/binary_size_utils.py

Issue 397593007: Handle shared memory symbols better in the binarysize tool. (Closed)
Patch Set: Removed extra output in unittest. Created 5 years, 10 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 | tools/binary_size/explain_binary_size_delta.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/binary_size/binary_size_utils.py
diff --git a/tools/binary_size/binary_size_utils.py b/tools/binary_size/binary_size_utils.py
index f265f61b03afb4ff3df0a561afe3245cf0f4d2ab..5521ba7d7e912e88db14d50c339223c4e6629850 100644
--- a/tools/binary_size/binary_size_utils.py
+++ b/tools/binary_size/binary_size_utils.py
@@ -23,7 +23,7 @@ def ParseNm(nm_lines):
"""
# Match lines with size, symbol, optional location, optional discriminator
- sym_re = re.compile(r'^[0-9a-f]{8,} ' # address (8+ hex digits)
+ sym_re = re.compile(r'^([0-9a-f]{8,}) ' # address (8+ hex digits)
'([0-9a-f]{8,}) ' # size (8+ hex digits)
'(.) ' # symbol type, one character
'([^\t]+)' # symbol name, separated from next by tab
@@ -39,12 +39,12 @@ def ParseNm(nm_lines):
line = line.rstrip()
match = sym_re.match(line)
if match:
- size, sym_type, sym = match.groups()[0:3]
+ address, size, sym_type, sym = match.groups()[0:4]
size = int(size, 16)
if sym_type in ('B', 'b'):
continue # skip all BSS for now.
- path = match.group(4)
- yield sym, sym_type, size, path
+ path = match.group(5)
+ yield sym, sym_type, size, path, address
continue
match = addr_re.match(line)
if match:
« no previous file with comments | « no previous file | tools/binary_size/explain_binary_size_delta.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698