From: Mauricio Faria de Oliveira <mfo@igalia.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Yury Norov <ynorov@nvidia.com>,
Valtteri Koskivuori <vkoskiv@gmail.com>,
kernel-dev@igalia.com, linux-kernel@vger.kernel.org,
Eric Dumazet <edumazet@kernel.org>,
Mauricio Faria de Oliveira <mfo@igalia.com>
Subject: [PATCH] scripts/bloat-o-meter: describe output fields in help text
Date: Thu, 26 Nov 2026 19:13:00 -0300 [thread overview]
Message-ID: <20261126-bloat-o-meter-help-v1-1-fb0785c94bbf@igalia.com> (raw)
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>
next reply other threads:[~2026-11-26 22:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 22:13 Mauricio Faria de Oliveira [this message]
2026-11-27 1:18 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126-bloat-o-meter-help-v1-1-fb0785c94bbf@igalia.com \
--to=mfo@igalia.com \
--cc=akpm@linux-foundation.org \
--cc=edumazet@kernel.org \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoskiv@gmail.com \
--cc=ynorov@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®