U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: "u-boot@lists.denx.de" <u-boot@lists.denx.de>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Jerome Forissier <jerome.forissier@linaro.org>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Marek Vasut <marex@denx.de>, Michal Simek <michal.simek@amd.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Rasmus Villemoes <ravi@prevas.dk>, Simon Glass <sjg@chromium.org>,
	Tom Rini <trini@konsulko.com>,
	Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Subject: Re: [PATCH V3 0/3] cmd: env: select: Add output for available environment targets
Date: Mon, 12 May 2025 21:25:46 +0300	[thread overview]
Message-ID: <aCI9KoEkJR8P8lit@smile.fi.intel.com> (raw)
In-Reply-To: <bd2e8c8f75a74a509653351208abf4d8@dh-electronics.com>

On Mon, May 12, 2025 at 03:15:06PM +0000, Christoph Niedermaier wrote:
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Sent: Monday, May 12, 2025 10:38 AM
> > On Mon, May 12, 2025 at 08:22:19AM +0000, Christoph Niedermaier wrote:
> >> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >> Sent: Monday, May 12, 2025 9:38 AM
> >>> On Fri, May 09, 2025 at 09:00:40PM +0200, Christoph Niedermaier wrote:
> >>>> Add the "-l" parameter to the "env select" command to print the available
> >>>> environment targets, convert all argument parsing in the file nvedit.c to
> >>>> getopt() and check that with unit tests.
> >>>>
> >>>> The first patch converts the parsing of arguments to getopt() for all env
> >>>> commands. The second one adds unit tests for checking the env command.
> >>>> These were used to check the env commands before and after the conversion.
> >>>> The third patch adds the actual new parameter "-l" for the "env select"
> >>>> command.
> >>>
> >>> What is the binary size increase with this change, please?
> >>
> >> I don't know exactly which binary size I should look at?
> >> I have looked at the object file of nvedit.c:
> >>
> >> I built it with the config dh_imx6_defconfig.
> >>
> >> Before my patches:
> >> $ ls -la cmd/nvedit.o
> >> -rw-r--r-- 1 developer developer 57644 May 12 10:03 cmd/nvedit.o
> >>
> >> After my patches:
> >> $ ls -la cmd/nvedit.o
> >> -rw-r--r-- 1 developer developer 59292 May 12 10:06 cmd/nvedit.o
> >>
> >> So the increase is 1648 Bytes (+2.86%).
> > 
> > U-Boot binary. And better to use bloat-o-meter script for that, it shows the
> > breakdown in more precise terms.
> 
> With bloat-o-meter it looks like this (before and after my patches):
> 
> ./bloat-o-meter -p arm-linux-gnueabihf- u-boot_before u-boot_after
> add/remove: 5/1 grow/shrink: 4/2 up/down: 1152/-652 (500)
> Function                                     old     new   delta
> bdinfo_print_all                               -     404    +404
> __getopt.constprop                             -     292    +292
> substitute                                     -     156    +156
> print_eth                                      -     124    +124
> print_bi_dram                                  -      72     +72
> do_env_default                               116     152     +36
> do_env_import                                424     456     +32
> do_env_print                                 740     764     +24
> do_env_delete                                 92     104     +12
> do_env_export                                336     328      -8
> substitute.lto_priv                          156       -    -156
> do_bdinfo                                    580      92    -488
> Total: Before=501681, After=502181, chg +0.10%

Not bad. Thank you for sharing!

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2025-05-12 18:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09 19:00 [PATCH V3 0/3] cmd: env: select: Add output for available environment targets Christoph Niedermaier
2025-05-09 19:00 ` [PATCH V3 1/3] cmd: nvedit: Convert the parsing of arguments to getopt() Christoph Niedermaier
2025-05-09 19:00 ` [PATCH V3 2/3] test: cmd: nvedit: Add basic unit tests Christoph Niedermaier
2025-06-03 20:12   ` Tom Rini
2025-06-06 21:40     ` Christoph Niedermaier
2025-05-09 19:00 ` [PATCH V3 3/3] cmd: env: select: Add output for available environment targets Christoph Niedermaier
2025-05-12  7:37 ` [PATCH V3 0/3] " Andy Shevchenko
2025-05-12  8:22   ` Christoph Niedermaier
2025-05-12  8:38     ` Andy Shevchenko
2025-05-12 15:15       ` Christoph Niedermaier
2025-05-12 18:25         ` Andy Shevchenko [this message]

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=aCI9KoEkJR8P8lit@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=ansuelsmth@gmail.com \
    --cc=cniedermaier@dh-electronics.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jerome.forissier@linaro.org \
    --cc=joe.hershberger@ni.com \
    --cc=marex@denx.de \
    --cc=michal.simek@amd.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=ravi@prevas.dk \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=venkatesh.abbarapu@amd.com \
    --cc=xypron.glpk@gmx.de \
    /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