Re: The case of LTO when produced enlarged binaries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Fri, 2020-07-24 at 14:32 -0600, Jeff Law wrote:
> On Fri, 2020-07-24 at 22:30 +0200, Igor Raits wrote:
> > On Fri, 2020-07-24 at 14:27 -0600, Jeff Law wrote:
> > > On Fri, 2020-07-24 at 22:24 +0200, Igor Raits wrote:
> > > > On Fri, 2020-07-24 at 13:29 -0600, Jeff Law wrote:
> > > > > On Fri, 2020-07-24 at 19:12 +0000, Artem Tim wrote:
> > > > > > Hi. In rare cases building packages with LTO producing
> > > > > > binaries
> > > > > > or
> > > > > > libraries which have bigger size then if they have built
> > > > > > without
> > > > > > LTO. For example 'kitty' package:
> > > > > > 
> > > > > > * with LTO:
> > > > > >   - koji task 
> > > > > > https://koji.fedoraproject.org/koji/taskinfo?taskID=47762998
> > > > > >     1.79 MB glfw-wayland.so
> > > > > >     1.99 MB glfw-x11.so
> > > > > >     4.78 MB fast_data_types.so
> > > > > >     8.56 MB total
> > > > > > 
> > > > > > * no LTO
> > > > > >   - koji 
> > > > > > https://koji.fedoraproject.org/koji/taskinfo?taskID=47769854
> > > > > >     1.65 MB glfw-wayland.so
> > > > > >     1.84 MB glfw-x11.so
> > > > > >     4.51 MB fast_data_types.so
> > > > > >     8.00 MB total
> > > > > > 
> > > > > > Difference is 7%. What we should do in such case? Should we
> > > > > > disable
> > > > > > LTO for such packages? Or there is still could be gains
> > > > > > from
> > > > > > faster
> > > > > > code execution speed?
> > > > > I'd tend to leave LTO on, but it's totally your call. 
> > > > > Without
> > > > > looking at the
> > > > > binaries, sources and compiler dumps I'd hazard a guess
> > > > > you're
> > > > > getting a lot of
> > > > > cross module inlining, but very little identical code
> > > > > folding. 
> > > > > THe
> > > > > former tends
> > > > > to make things bigger, but faster.  The latter tends to
> > > > > shrink
> > > > > code
> > > > > with little
> > > > > impact on runtime performance.
> > > > 
> > > > From what I see in this case, -ffat-lto-objects generates code
> > > > that
> > > > is
> > > > bigger than without -flto. -flto alone generates smaller code
> > > > than
> > > > without -flto.
> > > The fat-lto-objects bits are not used during an LTO link.  They
> > > exist
> > > solely to
> > > cover the case where there's a .o/.a that ends up installed.
> > 
> > Well, I tell what I see :)
> > 
> > Compiling kitty with settings below produces this big
> > /usr/lib64/kitty/kitty/fast_data_types.so:
> > 
> > * Without any LTO-related flags: 4.52 MB
> > * With -flto: 4.30 MB
> > * With -flto -ffat-lto-objects: 4.79 MB
> > 
> > Well, I did not run compilation multiple times but don't think it
> > will
> > change much.
> That's quite bizarre.  I'll put it on the list of things to
> investigate.

Hi Jeff,

Any news about this issue?

> jeff
> 

- -- 
Igor Raits <ignatenkobrain@xxxxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEcwgJ58gsbV5f5dMcEV1auJxcHh4FAl9Li60ACgkQEV1auJxc
Hh4q4A/6AyqFOE64rYb6gdhdlqJWKZovmucbeXMnpq6wD0zUqrpvaUyyAaSjGQ6D
tLs+7RC8rFqErfPDUsnSll90+HiHqHRp1O6UOLjRQ8EwbSVZGQ0e0l5NfrktRy8i
mjMG1r7KrKbuRQi3/4//lg8PQroVvXLqNIuwSpLYiDYA3loJAra0+pdP2mSdiWpk
zAn8uAx5wOLNmWKqv+OS6SU3oiJXAOezBgDSoF70fgxAep7qgv6J+wjLrtkl2U1G
3atZ2r7+pfvI5UiFp9/0CXT0ZW9SQRoXMza0OURZpvUIk21f0nYjQgXv4gEWttf/
7hOO4n+tg3xqurgb91j7WW9VNEiMbACYTidv/jxhAqOwBj6jeozh5e0YrmsRZ3Oa
ZN74SWXl9k2Omh8By3EaNappHCLO9Oxr0DTkt+hc2JNTtmc9m5SPYnl4nd+N80wd
iqv1Cg9wG46cL+Ofnz+L03F7rzsXN0ywwoKOZMGwkPsGrmOFcxko4iJ4j7tzUCiz
K0iJFqeYoh6oPRGomZ1+KZP+mlKGaV9GZ0FhdIhCOB0MV0Yshk+4TdW5OQ5sYsby
YLL12yN/WKCRsm16XH1bT8hu8Qu56bued0HOn9PrYDqz4txa2+d6QdOLUFTATiOY
QfWO+31o236UkWSjxc+Wc34KHox5vr+ueNrnDUaKtwOc7jpqvJ0=
=zrRd
-----END PGP SIGNATURE-----
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux