From: Marek Behun <marek.behun@nic.cz>
To: u-boot@lists.denx.de
Subject: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)
Date: Sat, 6 Mar 2021 18:37:49 +0100 [thread overview]
Message-ID: <20210306183749.23cebd9b@nic.cz> (raw)
In-Reply-To: <CAHCN7xJU+TY0qnVXcZCtV6K5Ub7NYaorLmao8noyfXo_xyjfHw@mail.gmail.com>
On Sat, 6 Mar 2021 05:12:12 -0600
Adam Ford <aford173@gmail.com> wrote:
> On Fri, Mar 5, 2021 at 9:03 PM Adam Ford <aford173@gmail.com> wrote:
> >
> > On Fri, Mar 5, 2021 at 11:10 AM Adam Ford <aford173@gmail.com> wrote:
> > >
> > > On Fri, Mar 5, 2021 at 6:31 AM Stefan Roese <sr@denx.de> wrote:
> > > >
> > > > On 05.03.21 12:25, Adam Ford wrote:
> > > > > On Thu, Mar 4, 2021 at 4:33 PM Marek Behun <marek.behun@nic.cz> wrote:
> > > > >>
> > > > >> On Thu, 4 Mar 2021 16:18:03 -0600
> > > > >> Adam Ford <aford173@gmail.com> wrote:
> > > > >>
> > > > >>> diff --git a/arch/arm/mach-omap2/omap3/Makefile
> > > > >>> b/arch/arm/mach-omap2/omap3/Makefile
> > > > >>> index 91ed8ebc9f..a2cc21c6d2 100644
> > > > >>> --- a/arch/arm/mach-omap2/omap3/Makefile
> > > > >>> +++ b/arch/arm/mach-omap2/omap3/Makefile
> > > > >>> @@ -6,6 +6,8 @@
> > > > >>> # If clock.c is compiled for Thumb2, then it fails on OMAP3530
> > > > >>> CFLAGS_clock.o += -marm
> > > > >>>
> > > > >>> +CFLAGS_REMOVE_file.o := $(LTO_CFLAGS)
> > > > >>
> > > > >> Eh? There is no file.c in arch/arm/mach-omap2/omap3/ directory.
> > > > >
> > > > > It must be from something else that had changed when I did a git pull
> > > > > pull on your repo. I guess that's better news.
> > > >
> > > > It might be a misunderstanding. Marek means that you need to replace
> > > > "file" with your real filename, like:
> > > >
> > > > driver_spi.c ->
> > > >
> > > > +CFLAGS_REMOVE_driver_spi.o := $(LTO_CFLAGS)
> > >
> > > I first did a git pull from his git repo, and then blindly copy-pasted
> > > the suggested link to that above directly. I don't play with
> > > Makefiles often, so I didn't really notice that I needed to match the
> > > line to an actual file. When I rebuilt, my initial issue with showing
> > > too much DDR and hanging went away, so I wrongly assumed that this
> > > fixed it. In reality, I think it was a patch that had been applied to
> > > his git repo that got pulled in at the same time.
> > >
> > > On the testing front,
> > > I started testing the da850evm (ARM9) this morning. I ran into an
> > > issue that I apparently caused some time ago, and I'm trying to
> > > resolve that now. I have it working, but I need to clean it up. I'll
> > > push the clean-up to the ML then try the LTO on that board to see if
> > > U-Boot and/or SPL work with LTO enabled.
> > >
> > > As of now, I have one board that seems to fully boot (imx6q_logic) and
> > > a family of boards that work in U-Boot but not SPL (omap3_logic).
> > >
> > > After the da850em, I'll test a 64-bit Renesas board without SPL and a
> > > 64-bit NXP board with SPL to test.
> > >
> > > On the build-testing I have done, I am seeing an average of a 10-20%
> > > reduction in size for SPL, and a ~ 3% reduction in size in U-Boot.
> > >
> >
> > With a patch that I've already sent to the mailing list for the
> > da850evm, it's booting both SPL and U-Boot
> >
> > With the compiler I have, the code went from:
> > SPL 24305
> > U-Boot 381930
> >
> > To:
> > SPL 20937
> > U-Boot 358780
> >
> > For a Reduction of:
> > SPL -3368 (-13.86%)
> > U-Boot -23150 (-6.06%)
> >
> > I didn't test the NOR or NAND booting versions of the da850evm, but I
> > will try to do that when the time comes.
> >
>
> I ran the same tests on the imx8mn_beacon board, and this board boots.
>
> Without LTO
> SPL 82487
> U-Boot 704477
>
> With LTO:
> SPL 74526
> U-Boot 670859
>
> For a reduction of:
> SPL -7961 (-9.65%)
> U-Boot -33618 (-4.77%)
Thank you Adam for these tests.
I think you are right in that we should not enable LTO for all ARM
boards, but only those that are tested, at least until for example
about 80% of them are tested.
Marek
next prev parent reply other threads:[~2021-03-06 17:37 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 4:11 [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51) Marek Behún
2021-03-03 4:12 ` [RFC PATCH u-boot 01/12] build: use thin archives instead of incremental linking Marek Behún
2021-03-04 10:57 ` Bin Meng
2021-03-04 18:17 ` Marek Behun
2021-03-05 13:34 ` Bin Meng
2021-03-05 13:37 ` Tom Rini
2021-03-06 21:20 ` Marek Behun
2021-03-05 15:39 ` Marek Behun
2021-03-03 4:12 ` [RFC PATCH u-boot 02/12] sandbox: errno: avoid conflict with libc's errno Marek Behún
2021-03-05 3:00 ` Bin Meng
2021-03-05 15:37 ` Marek Behun
2021-03-05 16:39 ` Simon Glass
2021-03-05 16:50 ` Marek Behun
2021-03-05 16:58 ` Simon Glass
2021-03-05 17:24 ` Heinrich Schuchardt
2021-03-05 17:24 ` Marek Behun
2021-03-05 19:42 ` Simon Glass
2021-03-05 17:21 ` Heinrich Schuchardt
2021-03-07 3:14 ` Marek Behun
2021-03-12 4:45 ` Simon Glass
2021-03-03 4:12 ` [RFC PATCH u-boot 03/12] linker_lists: declare entries and lists externally visible Marek Behún
2021-03-04 13:47 ` Marek Behun
2021-03-05 3:04 ` Bin Meng
2021-03-05 15:49 ` Marek Behun
2021-03-03 4:12 ` [RFC PATCH u-boot 04/12] efi_loader: fix warning when linking with LTO Marek Behún
2021-03-05 5:50 ` Bin Meng
2021-03-03 4:12 ` [RFC PATCH u-boot 05/12] binman: declare symbols externally visible Marek Behún
2021-03-04 0:37 ` Tom Rini
2021-03-04 1:53 ` Marek Behun
2021-03-03 4:12 ` [RFC PATCH u-boot 06/12] build: support building with Link Time Optimizations Marek Behún
2021-03-05 6:34 ` Bin Meng
2021-03-03 4:12 ` [RFC PATCH u-boot 07/12] arch: sandbox: make LTO available Marek Behún
2021-03-03 4:12 ` [RFC PATCH u-boot 08/12] sandbox: build with LTO Marek Behún
2021-03-03 4:12 ` [RFC PATCH u-boot 09/12] ARM: make gd a function for LTO Marek Behún
2021-03-03 4:12 ` [RFC PATCH u-boot 10/12] string: make memcpy() visible to fix LTO linking errors Marek Behún
2021-03-03 4:12 ` [RFC PATCH u-boot 11/12] arch: ARM: make LTO available Marek Behún
2021-03-03 4:12 ` [RFC PATCH u-boot 12/12] Nokia RX-51: build with LTO Marek Behún
2021-03-03 16:11 ` [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51) Tom Rini
2021-03-03 16:41 ` Marek Behun
2021-03-03 16:47 ` Tom Rini
2021-03-03 21:36 ` Tom Rini
2021-03-04 0:40 ` Adam Ford
2021-03-04 7:07 ` [PATCH] arm: fix LTO build for some thumb-interwork cases Marek Behún
2021-03-04 10:43 ` [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51) Marek Behun
2021-03-04 13:46 ` Adam Ford
2021-03-04 13:50 ` Marek Behun
2021-03-04 13:59 ` Adam Ford
2021-03-04 14:58 ` Tom Rini
2021-03-04 15:07 ` Adam Ford
2021-03-04 15:37 ` Marek Behun
2021-03-04 16:18 ` Tom Rini
2021-03-04 15:59 ` Marek Behun
2021-03-04 22:18 ` Adam Ford
2021-03-04 22:33 ` Marek Behun
2021-03-05 11:25 ` Adam Ford
2021-03-05 12:31 ` Stefan Roese
2021-03-05 17:10 ` Adam Ford
2021-03-06 3:03 ` Adam Ford
2021-03-06 11:12 ` Adam Ford
2021-03-06 17:37 ` Marek Behun [this message]
2021-03-06 20:08 ` Tom Rini
2021-03-06 20:41 ` Pali Rohár
2021-03-06 20:54 ` Marek Behun
2021-03-06 21:00 ` Pali Rohár
2021-03-06 21:19 ` Marek Behun
2021-03-06 21:38 ` Pali Rohár
2021-03-06 21:49 ` Marek Behun
2021-03-07 3:45 ` Adam Ford
2021-03-07 4:06 ` Marek Behun
2021-05-09 14:14 ` Adam Ford
2021-05-09 18:44 ` Marek Behun
2021-05-10 16:28 ` Simon Glass
2021-05-13 9:22 ` Pali Rohár
2021-03-04 16:17 ` Tom Rini
2021-03-04 16:35 ` Pali Rohár
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=20210306183749.23cebd9b@nic.cz \
--to=marek.behun@nic.cz \
--cc=u-boot@lists.denx.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