[dpdk-dev] [PATCH v2 01/10] build: add an option to enable LTO build

Mattias Rönnblom mattias.ronnblom at ericsson.com
Mon Sep 23 12:16:49 CEST 2019


On 2019-09-23 11:36, Ray Kinsella wrote:
> 
> 
> On 23/09/2019 08:23, Thomas Monjalon wrote:
>> 20/09/2019 09:38, Ray Kinsella:
>>>
>>> On 19/09/2019 16:16, Bruce Richardson wrote:
>>>> On Thu, Sep 19, 2019 at 02:28:04PM +0100, Ray Kinsella wrote:
>>>>>
>>>>>
>>>>> On 19/09/2019 13:35, Andrzej Ostruszka wrote:
>>>>>> On 9/18/19 3:32 PM, Ray Kinsella wrote:
>>>>> ...>
>>>>>> Compilation time is much longer.  In a normal hack|fix/compile/repeat
>>>>>> cycle with "compile" part being simple "make" the link time might be a
>>>>>> bit annoying.  So I imagine keeping LTO off for the most part of the dev
>>>>>> cycle and then at the end when doing release/cleanup turn LTO on - to
>>>>>> either get release build ready or to get some set of warnings that you
>>>>>> address before yet another attempt to release build.
>>>>>
>>>>> Well look, I would say a few things.
>>>>>
>>>>> 1. I see build times going down dramatically with Meson/Ninja in any case.
>>>>
>>>> In the general case yes, but mainly it helps if you have a large number of
>>>> cores. For anyone building in a CI with only a couple of cores, meson+ninja
>>>> isn't going to help much.
>>>>
>>>> /Bruce
>>>>
>>>
>>> Very true, and I completely acknowledge that LTO adds compilation time.
>>> I would just like to see it in or out, not another build time option.
>>
>> Please can we get some numbers to understand how longer it is?
>>
> 
> I will note here, that it will always be a function of the number of
> object files involved. We should measure it now to understand ...
> 
> 

On my system the non-LTO from-scratch build takes about one minute. With 
LTO enabled, it takes about five minutes.

In addition, it makes our application *run* slower as well.

This reinforces past experience I have with LTO - it's more cool than 
useful, unless you care much about the resulting code size.


More information about the dev mailing list