* [PATCH] scripts/bloat-o-meter: describe output fields in help text
@ 2026-11-26 22:13 Mauricio Faria de Oliveira
2026-11-27 1:18 ` Andrew Morton
2026-11-27 1:19 ` + scripts-bloat-o-meter-describe-output-fields-in-help-text.patch " Andrew Morton
0 siblings, 2 replies; 5+ messages in thread
From: Mauricio Faria de Oliveira @ 2026-11-26 22:13 UTC (permalink / raw)
To: Andrew Morton
Cc: Yury Norov, Valtteri Koskivuori, kernel-dev, linux-kernel,
Eric Dumazet, Mauricio Faria de Oliveira
First time users of the bloat-o-meter script might not understand what
its output fields mean (add/remove, grow/shrink, up/down, Before/After),
and even occasional users might eventually forget.
Describe the output fields in the help text, so it is quick to find out.
RawTextHelpFormatter is used in order to keep line breaks in place.
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
---
Before:
$ ./scripts/bloat-o-meter -h
usage: bloat-o-meter [-h] [-c | -d | -t] [-p PREFIX] file_old file_new
Simple script used to compare the symbol sizes of 2 object files
positional arguments:
...
options:
...
After:
$ ./scripts/bloat-o-meter -h
usage: bloat-o-meter [-h] [-c | -d | -t] [-p PREFIX] file_old file_new
Simple script used to compare the symbol sizes of 2 object files
fields:
add/remove: number of symbols added in the new file / removed from the old file.
grow/shrink: number of symbols in both files that had a size increase / decrease.
up/down: size of symbols added plus size increase / removed plus size decrease.
(change): difference between up and down sizes.
Symbol lines: symbol name, old size, new size, and size delta;
'-' means symbol added/removed;
'0' delta symbols not included.
Before: size of all symbols in old file.
After: size of all symbols in new file.
chg: percent change.
Symbols in both files with the same size are only counted in Before/After/chg.
positional arguments:
...
options:
...
---
scripts/bloat-o-meter | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index 5868a8b11b0f93930ef7b666bcdd229f89dd58be..d988b623e86ee97e296521bdd76aa621ecb8823d 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -9,10 +9,32 @@
import sys, os, re, argparse
from signal import signal, SIGPIPE, SIG_DFL
+from argparse import RawTextHelpFormatter
signal(SIGPIPE, SIG_DFL)
-parser = argparse.ArgumentParser(description="Simple script used to compare the symbol sizes of 2 object files")
+description = \
+"""
+Simple script used to compare the symbol sizes of 2 object files
+
+fields:
+ add/remove: number of symbols added in the new file / removed from the old file.
+ grow/shrink: number of symbols in both files that had a size increase / decrease.
+ up/down: size of symbols added plus size increase / removed plus size decrease.
+ (change): difference between up and down sizes.
+
+ Symbol lines: symbol name, old size, new size, and size delta;
+ '-' means symbol added/removed;
+ '0' delta symbols not included.
+
+ Before: size of all symbols in old file.
+ After: size of all symbols in new file.
+ chg: percent change.
+
+ Symbols in both files with the same size are only counted in Before/After/chg.
+"""
+
+parser = argparse.ArgumentParser(description=description, formatter_class=RawTextHelpFormatter)
group = parser.add_mutually_exclusive_group()
group.add_argument('-c', help='categorize output based on symbol type', action='store_true')
group.add_argument('-d', help='Show delta of Data Section', action='store_true')
---
base-commit: 9437046953b2fb3bf55b36582450ea0267df82a7
change-id: 20261126-bloat-o-meter-help-f3dad95d442c
Best regards,
--
Mauricio Faria de Oliveira <mfo@igalia.com>
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] scripts/bloat-o-meter: describe output fields in help text
2026-11-26 22:13 [PATCH] scripts/bloat-o-meter: describe output fields in help text Mauricio Faria de Oliveira
@ 2026-11-27 1:18 ` Andrew Morton
2026-11-27 14:33 ` Mauricio Faria de Oliveira
2026-11-27 1:19 ` + scripts-bloat-o-meter-describe-output-fields-in-help-text.patch " Andrew Morton
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2026-11-27 1:18 UTC (permalink / raw)
To: Mauricio Faria de Oliveira
Cc: Yury Norov, Valtteri Koskivuori, kernel-dev, linux-kernel,
Eric Dumazet
On Thu, 26 Nov 2026 19:13:00 -0300 Mauricio Faria de Oliveira <mfo@igalia.com> wrote:
> First time users of the bloat-o-meter script might not understand what
> its output fields mean (add/remove, grow/shrink, up/down, Before/After),
> and even occasional users might eventually forget.
>
> Describe the output fields in the help text, so it is quick to find out.
>
> RawTextHelpFormatter is used in order to keep line breaks in place.
>
Nice, thanks.
RawTextHelpFormatter has apparently been in argparse since 2011 so
there's no breakage risk.
> Before: size of all symbols in old file.
> After: size of all symbols in new file.
LLM suggested a little adjustment here. wdyt?
From: Andrew Morton <akpm@linux-foundation.org>
Subject: scripts/bloat-o-meter: clarify Before and After help text
Date: Thu, 26 Nov 2026 17:15:17 -0800
bloat-o-meter selects symbol types according to its options and filters
some names. Mauricio Faria de Oliveira's new help text describes Before
and After as the sizes of all symbols in each file, which includes
symbols that the script does not count. Say "selected symbols" instead.
--- a/scripts/bloat-o-meter~scripts-bloat-o-meter-describe-output-fields-in-help-text-fix
+++ a/scripts/bloat-o-meter
@@ -27,8 +27,8 @@ fields:
'-' means symbol added/removed;
'0' delta symbols not included.
- Before: size of all symbols in old file.
- After: size of all symbols in new file.
+ Before: size of selected symbols in old file.
+ After: size of selected symbols in new file.
chg: percent change.
Symbols in both files with the same size are only counted in Before/After/chg.
_
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] scripts/bloat-o-meter: describe output fields in help text
2026-11-27 1:18 ` Andrew Morton
@ 2026-11-27 14:33 ` Mauricio Faria de Oliveira
2026-11-29 3:27 ` + scripts-bloat-o-meter-describe-output-fields-in-help-text-fix-2.patch added to mm-nonmm-unstable branch Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Mauricio Faria de Oliveira @ 2026-11-27 14:33 UTC (permalink / raw)
To: Andrew Morton
Cc: Yury Norov, Valtteri Koskivuori, kernel-dev, linux-kernel,
Eric Dumazet
On 2026-11-26 22:18, Andrew Morton wrote:
> On Thu, 26 Nov 2026 19:13:00 -0300 Mauricio Faria de Oliveira <mfo@igalia.com> wrote:
[...]
Thanks for reviewing.
>> Before: size of all symbols in old file.
>> After: size of all symbols in new file.
>
> LLM suggested a little adjustment here. wdyt?
>
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: scripts/bloat-o-meter: clarify Before and After help text
> Date: Thu, 26 Nov 2026 17:15:17 -0800
>
> bloat-o-meter selects symbol types according to its options and filters
> some names. Mauricio Faria de Oliveira's new help text describes Before
> and After as the sizes of all symbols in each file, which includes
> symbols that the script does not count. Say "selected symbols" instead.
>
> --- a/scripts/bloat-o-meter~scripts-bloat-o-meter-describe-output-fields-in-help-text-fix
> +++ a/scripts/bloat-o-meter
> @@ -27,8 +27,8 @@ fields:
> '-' means symbol added/removed;
> '0' delta symbols not included.
>
> - Before: size of all symbols in old file.
> - After: size of all symbols in new file.
> + Before: size of selected symbols in old file.
> + After: size of selected symbols in new file.
> chg: percent change.
>
> Symbols in both files with the same size are only counted in Before/After/chg.
> _
Good catch.
However, 'selected' may be confusing as there is no context about
selection in earlier text.
In Before/After, 'all symbols' is related to the note 'Symbols in both
files with the same size ...'.
So, we could instead simplify it inline:
Before: size of symbols in old file.
After: size of symbols in new file.
chg: percent change.
'0' delta symbols (same size in both files) are
included.
Do you like this one? If so, please let me know if either a v2 or an
additional patch is preferred.
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -25,13 +25,12 @@ fields:
Symbol lines: symbol name, old size, new size, and size delta;
'-' means symbol added/removed;
- '0' delta symbols not included.
+ '0' delta symbols (same size in both files) not
included.
- Before: size of all symbols in old file.
- After: size of all symbols in new file.
+ Before: size of symbols in old file.
+ After: size of symbols in new file.
chg: percent change.
-
- Symbols in both files with the same size are only counted in
Before/After/chg.
+ '0' delta symbols (same size in both files) are
included.
"""
Thanks,
--
Mauricio
^ permalink raw reply [flat|nested] 5+ messages in thread* + scripts-bloat-o-meter-describe-output-fields-in-help-text-fix-2.patch added to mm-nonmm-unstable branch
2026-11-27 14:33 ` Mauricio Faria de Oliveira
@ 2026-11-29 3:27 ` Andrew Morton
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2026-11-29 3:27 UTC (permalink / raw)
To: mm-commits, ynorov, vkoskiv, edumazet, mfo, akpm
The patch titled
Subject: scripts-bloat-o-meter-describe-output-fields-in-help-text-fix-2.
has been added to the -mm mm-nonmm-unstable branch. Its filename is
scripts-bloat-o-meter-describe-output-fields-in-help-text-fix-2.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/scripts-bloat-o-meter-describe-output-fields-in-help-text-fix-2.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Mauricio Faria de Oliveira <mfo@igalia.com>
Subject: scripts-bloat-o-meter-describe-output-fields-in-help-text-fix-2.
Date: Fri, 27 Nov 2026 11:33:52 -0300
further help tweaks
Link: https://patch.msgid.link/c12aa3cbb154dde7dfc1cfe8c1b9e019@igalia.com
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Yury Norov <ynorov@nvidia.com>
Cc: Valtteri Koskivuori <vkoskiv@gmail.com>
Cc: Eric Dumazet <edumazet@kernel.org>
scripts/bloat-o-meter | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/scripts/bloat-o-meter~scripts-bloat-o-meter-describe-output-fields-in-help-text-fix-2
+++ a/scripts/bloat-o-meter
@@ -25,13 +25,12 @@ fields:
Symbol lines: symbol name, old size, new size, and size delta;
'-' means symbol added/removed;
- '0' delta symbols not included.
+ '0' delta symbols (same size in both files) not included.
- Before: size of all symbols in old file.
- After: size of all symbols in new file.
+ Before: size of symbols in old file.
+ After: size of symbols in new file.
chg: percent change.
-
- Symbols in both files with the same size are only counted in Before/After/chg.
+ '0' delta symbols (same size in both files) are included.
"""
parser = argparse.ArgumentParser(description=description, formatter_class=RawTextHelpFormatter)
_
Patches currently in -mm which might be from mfo@igalia.com are
mm-page_owner-document-shell-usage-of-page_owner-filters.patch
scripts-bloat-o-meter-describe-output-fields-in-help-text.patch
scripts-bloat-o-meter-describe-output-fields-in-help-text-fix-2.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
* + scripts-bloat-o-meter-describe-output-fields-in-help-text.patch added to mm-nonmm-unstable branch
2026-11-26 22:13 [PATCH] scripts/bloat-o-meter: describe output fields in help text Mauricio Faria de Oliveira
2026-11-27 1:18 ` Andrew Morton
@ 2026-11-27 1:19 ` Andrew Morton
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2026-11-27 1:19 UTC (permalink / raw)
To: mm-commits, ynorov, vkoskiv, edumazet, mfo, akpm
The patch titled
Subject: scripts/bloat-o-meter: describe output fields in help text
has been added to the -mm mm-nonmm-unstable branch. Its filename is
scripts-bloat-o-meter-describe-output-fields-in-help-text.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/scripts-bloat-o-meter-describe-output-fields-in-help-text.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Mauricio Faria de Oliveira <mfo@igalia.com>
Subject: scripts/bloat-o-meter: describe output fields in help text
Date: Thu, 26 Nov 2026 19:13:00 -0300
First time users of the bloat-o-meter script might not understand what
its output fields mean (add/remove, grow/shrink, up/down, Before/After),
and even occasional users might eventually forget.
Describe the output fields in the help text, so it is quick to find out.
RawTextHelpFormatter is used in order to keep line breaks in place.
Link: https://patch.msgid.link/20261126-bloat-o-meter-help-v1-1-fb0785c94bbf@igalia.com
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Yury Norov <ynorov@nvidia.com>
Cc: Valtteri Koskivuori <vkoskiv@gmail.com>
Cc: Eric Dumazet <edumazet@kernel.org>
scripts/bloat-o-meter | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
--- a/scripts/bloat-o-meter~scripts-bloat-o-meter-describe-output-fields-in-help-text
+++ a/scripts/bloat-o-meter
@@ -9,10 +9,32 @@
import sys, os, re, argparse
from signal import signal, SIGPIPE, SIG_DFL
+from argparse import RawTextHelpFormatter
signal(SIGPIPE, SIG_DFL)
-parser = argparse.ArgumentParser(description="Simple script used to compare the symbol sizes of 2 object files")
+description = \
+"""
+Simple script used to compare the symbol sizes of 2 object files
+
+fields:
+ add/remove: number of symbols added in the new file / removed from the old file.
+ grow/shrink: number of symbols in both files that had a size increase / decrease.
+ up/down: size of symbols added plus size increase / removed plus size decrease.
+ (change): difference between up and down sizes.
+
+ Symbol lines: symbol name, old size, new size, and size delta;
+ '-' means symbol added/removed;
+ '0' delta symbols not included.
+
+ Before: size of all symbols in old file.
+ After: size of all symbols in new file.
+ chg: percent change.
+
+ Symbols in both files with the same size are only counted in Before/After/chg.
+"""
+
+parser = argparse.ArgumentParser(description=description, formatter_class=RawTextHelpFormatter)
group = parser.add_mutually_exclusive_group()
group.add_argument('-c', help='categorize output based on symbol type', action='store_true')
group.add_argument('-d', help='Show delta of Data Section', action='store_true')
_
Patches currently in -mm which might be from mfo@igalia.com are
scripts-bloat-o-meter-describe-output-fields-in-help-text.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-29 3:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 22:13 [PATCH] scripts/bloat-o-meter: describe output fields in help text Mauricio Faria de Oliveira
2026-11-27 1:18 ` Andrew Morton
2026-11-27 14:33 ` Mauricio Faria de Oliveira
2026-11-29 3:27 ` + scripts-bloat-o-meter-describe-output-fields-in-help-text-fix-2.patch added to mm-nonmm-unstable branch Andrew Morton
2026-11-27 1:19 ` + scripts-bloat-o-meter-describe-output-fields-in-help-text.patch " Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.