Re: The case of LTO when produced enlarged binaries

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

 



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.

jeff
_______________________________________________
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