Skip to contentSkip to conversation

bloat-o-meter-support-comparing-library-archives.patch removed from -mm tree

merged [email protected] 1 participant 1 message Aug 10, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: scripts/bloat-o-meter: Support comparing library archives
has been removed from the -mm tree. Its filename was
bloat-o-meter-support-comparing-library-archives.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Nikolay Borisov <[email protected]>
Subject: scripts/bloat-o-meter: Support comparing library archives

Library archives (.a) usually contain multiple object files so their output of nm --size-sort contains lines like:

<omitted for brevity>
00000000000003a8 t run_test

extent-map-tests.o:
<omitted for brevity>

bloat-o-meter currently doesn't handle them which results in errors when calling .split() on them. Fix this by simply ignoring them. This enables diffing subsystems which generate built-in.a files.

---

 scripts/bloat-o-meter |    2 ++
 1 file changed, 2 insertions(+)
scripts/bloat-o-meter renamed from scripts/bloat-o-meter~bloat-o-meter-support-comparing-library-archives +2 -0
@@ -26,6 +26,8 @@ def getsizes(file, format):
     sym = {}
     with os.popen("nm --size-sort " + file) as f:
         for line in f:
+            if line.startswith("\n") or ":" in line:
+                continue
             size, type, name = line.split()
             if type in format:
                 # strip generated symbols

_

Patches currently in -mm which might be from [email protected] are