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

Unified Diff: tools/binary_size/libsupersize/describe.py

Issue 2889603002: supersize: Add "printed" to console, Show ~0 for PSS >0 <.1 (Closed)
Patch Set: add in Symbol Group counter reset Created 3 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 | « tools/binary_size/libsupersize/console.py ('k') | tools/binary_size/libsupersize/linker_map_parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/binary_size/libsupersize/describe.py
diff --git a/tools/binary_size/libsupersize/describe.py b/tools/binary_size/libsupersize/describe.py
index a530c3ed0395830ee2d1cd11aaee00a5e6d422d2..d7bf827480b6bcf322319b4d54752aa00e80dbb8 100644
--- a/tools/binary_size/libsupersize/describe.py
+++ b/tools/binary_size/libsupersize/describe.py
@@ -37,6 +37,8 @@ def _FormatPss(pss):
ret = str(round(pss, 1))
if ret.endswith('.0'):
ret = ret[:-2]
+ if ret == '0' and pss:
+ ret = '~0'
estevenson 2017/05/16 15:11:07 nit: won't this actually only return ~0 for 0 < ps
agrieve 2017/05/16 15:22:31 Fixed commit msg.
return ret
@@ -162,7 +164,9 @@ class Describer(object):
data_size += s.pss
elif s.section == 'b':
bss_size += s.pss
- unique_paths.add(s.object_path)
+ # Ignore paths like foo/{shared}/2
+ if '{' not in s.object_path:
+ unique_paths.add(s.object_path)
header_desc = [
'Showing {:,} symbols ({:,} unique) with total pss: {} bytes'.format(
len(group), group.CountUniqueSymbols(), int(total_size)),
@@ -170,7 +174,7 @@ class Describer(object):
_PrettySize(int(code_size)), _PrettySize(int(ro_size)),
_PrettySize(int(data_size)), _PrettySize(int(bss_size)),
_PrettySize(int(total_size))),
- 'Number of object files: {}'.format(len(unique_paths)),
+ 'Number of unique paths: {}'.format(len(unique_paths)),
'',
'Index, Running Total, Section@Address, PSS',
'-' * 60
« no previous file with comments | « tools/binary_size/libsupersize/console.py ('k') | tools/binary_size/libsupersize/linker_map_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698