[U-Boot] [PATCH v2 4/6] scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987

Eugeniu Rosca erosca at de.adit-jv.com
Tue May 15 13:46:09 UTC 2018


Hi Simon,

On Mon, May 14, 2018 at 01:52:09PM -0600, Simon Glass wrote:
> Hi,
> 
> On 13 May 2018 at 16:45, Eugeniu Rosca <roscaeugeniu at gmail.com> wrote:
> > Hi Simon,
> >
> > On Mon, May 14, 2018 at 08:00:40AM +1000, Simon Glass wrote:
> >> Hi,
> >>
> >> Can you please check that this does not adversely impact code size?
> >
> > Sure. Here are the sizes before and after this patch (sandbox):
> >
> > 1. ELF size comparison shows 96 bytes increase
> > $ du -b u-boot.before u-boot.after
> >   8055864       u-boot.before
> >   8055960       u-boot.after
> >
> > 2. BIN size comparison shows no change
> > $ du -b u-boot.bin.before u-boot.bin.after
> >   3377256       u-boot.bin.before
> >   3377256       u-boot.bin.after
> >
> > 3. "size" tool gives more details about ELF file size increase:
> > $ size u-boot.before u-boot.after
> >    text    data     bss     dec     hex filename
> >    1199720        76952  291760 1568432  17eeb0 u-boot.before
> >    1199736        76952  291760 1568448  17eec0 u-boot.after
> 
> Thanks for the info. That seems OK, but please check sandbox_spl (or
> better yet one of the Thumb2 SPL images that uses libfdt) since it is
> SPL that matters most.

I am having issues bringing up buildman on my host, so I just went
through the same procedure of building before and after using make
and comparing the ELF/BIN size for:
1. sandbox_spl_defconfig
2. x600_defconfig

There is no drastic change to previous results.

1.1 sandbox_spl_defconfig ELF size increase: 7394784-7394712 = 72 bytes.
1.2 sandbox_spl_defconfig BIN size increase: 3298280-3298280 = 0 bytes.

2.1 x600_defconfig ELF size increase: 3766144-3766232 = 88 bytes.
2.2 x600_defconfig BIN size increase: 439288-439240 = 48 bytes.

> >
> > 4. "bloaty" (diff mode) gives even more details (confirming the above)
> > $ bloaty -d compileunits u-boot.after -- u-boot.before
> >      VM SIZE                                FILE SIZE
> >  --------------                          --------------
> >   +2.5%     +30 lib/libfdt/fdt.c             +96  +1.5%
> >   [ = ]       0 lib/libfdt/fdt_sw.c          +21  +0.1%
> >   +2.6%     +16 [LOAD [RX]]                  +16  +2.6%
> >   [ = ]       0 lib/libfdt/fdt_overlay.c     +16  +0.1%
> >   [ = ]       0 [section .debug_str]          +2  +0.0%
> >   [ = ]       0 fs/ext4/ext4_common.c         -5  -0.0%
> >   [ = ]       0 common/fdt_support.c         -11  -0.0%
> >   -3.3%     -14 [section .text]              -14  -3.3%
> >   [ = ]       0 [Unmapped]                   -25  -0.7%
> >   +0.0%     +32 TOTAL                        +96  +0.0%
> 
> BTW buildman has a -B flag that shows function size.

Thanks for the tip. The nice thing about bloaty is that it provides
both VM and FILE size numbers. I am not sure if buildman can do the
same. Anyway, this was helpful and is expected to save time on my end
when I manage to bring it up.

> 
> Regards,
> Simon

Regards,
Eugeniu.


More information about the U-Boot mailing list