summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/binary_size/OWNERS3
-rw-r--r--tools/binary_size/binary_size_utils.py6
2 files changed, 9 insertions, 0 deletions
diff --git a/tools/binary_size/OWNERS b/tools/binary_size/OWNERS
new file mode 100644
index 0000000..c598cde
--- /dev/null
+++ b/tools/binary_size/OWNERS
@@ -0,0 +1,3 @@
+andrewhayden@chromium.org
+bratell@opera.com
+primiano@chromium.org
diff --git a/tools/binary_size/binary_size_utils.py b/tools/binary_size/binary_size_utils.py
index 5521ba7..67335c2 100644
--- a/tools/binary_size/binary_size_utils.py
+++ b/tools/binary_size/binary_size_utils.py
@@ -35,8 +35,14 @@ def ParseNm(nm_lines):
# Match lines with no symbol name, only addr and type
addr_only_re = re.compile(r'^[0-9a-f]{8,} (.)$')
+ seen_lines = set()
for line in nm_lines:
line = line.rstrip()
+ if line in seen_lines:
+ # nm outputs identical lines at times. We don't want to treat
+ # those as distinct symbols because that would make no sense.
+ continue
+ seen_lines.add(line)
match = sym_re.match(line)
if match:
address, size, sym_type, sym = match.groups()[0:4]