[PATCH] scripts/bloat-o-meter: Count weak symbol sizes

Geert Uytterhoeven posted 1 patch 2 years, 4 months ago
scripts/bloat-o-meter | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
[PATCH] scripts/bloat-o-meter: Count weak symbol sizes
Posted by Geert Uytterhoeven 2 years, 4 months ago
Currently, bloat-o-meter does not take into account weak symbols, and
thus ignores any size changes in code or data marked __weak.

Fix this by handling weak code ("w"/"W") and data ("v"/"V").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 scripts/bloat-o-meter | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index 36303afa9dfc33b1..888ce286a351e6e3 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -100,12 +100,12 @@ def print_result(symboltype, symbolformat):
     print("Total: Before=%d, After=%d, chg %+.2f%%" % (otot, ntot, percent))
 
 if args.c:
-    print_result("Function", "tT")
-    print_result("Data", "dDbB")
+    print_result("Function", "tTwW")
+    print_result("Data", "dDbBvV")
     print_result("RO Data", "rR")
 elif args.d:
-    print_result("Data", "dDbBrR")
+    print_result("Data", "dDbBrRvV")
 elif args.t:
-    print_result("Function", "tT")
+    print_result("Function", "tTwW")
 else:
-    print_result("Function", "tTdDbBrR")
+    print_result("Function", "tTdDbBrRvVwW")
-- 
2.34.1