]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scripts/bloat-o-meter: ignore _sdata
authorYury Norov <ynorov@nvidia.com>
Mon, 4 May 2026 20:36:05 +0000 (16:36 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 May 2026 04:24:48 +0000 (21:24 -0700)
_sdata is a linker symbol, but bloat-o-meter may consider it as a real
variable:

$ scripts/bloat-o-meter vmlinux.orig vmlinux
add/remove: 7/1 grow/shrink: 0/0 up/down: 3437/-4096 (-659)
Function                                     old     new   delta
crc32table_le                                  -    1024   +1024
crc32table_be                                  -    1024   +1024
crc32ctable_le                                 -    1024   +1024
byte_rev_table                                 -     256    +256
crc32_be                                       -      39     +39
crc32c                                         -      35     +35
crc32_le                                       -      35     +35
_sdata                                      4096       -   -4096
Total: Before=8592564398, After=8592563739, chg -0.00%

With the patch:

$ scripts/bloat-o-meter vmlinux.orig vmlinux
add/remove: 7/0 grow/shrink: 0/0 up/down: 3437/0 (3437)
Function                                     old     new   delta
crc32table_le                                  -    1024   +1024
crc32table_be                                  -    1024   +1024
crc32ctable_le                                 -    1024   +1024
byte_rev_table                                 -     256    +256
crc32_be                                       -      39     +39
crc32c                                         -      35     +35
crc32_le                                       -      35     +35
Total: Before=8592560302, After=8592563739, chg +0.00%

Link: https://lore.kernel.org/20260504203606.427972-1-ynorov@nvidia.com
Signed-off-by: Yury Norov <ynorov@nvidia.com>
Cc: Valtteri Koskivuori <vkoskiv@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/bloat-o-meter

index 9b4fb996d95bd5b9ff809eb39803ce03fcfde39f..5868a8b11b0f93930ef7b666bcdd229f89dd58be 100755 (executable)
@@ -43,6 +43,7 @@ def getsizes(file, format):
                 if name.startswith("__se_compat_sys"): continue
                 if name.startswith("__addressable_"): continue
                 if name.startswith("__noinstr_text_start"): continue
+                if name.startswith("_sdata"): continue
                 if name == "linux_banner": continue
                 if name == "vermagic": continue
                 # statics and some other optimizations adds random .NUMBER