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 |