tech-kern archive

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

Re: inline (Was: Bloat)



David Brownlee wrote:
> On Sun, 25 Jan 2009, Andrew Doran wrote:
> 
>> - Removing most of the inline functions from the x86 headers for pcc
>> and for
>>  modules reduced the size of the amd64 kernel by about 150kB because the
>>  compiler is stupid. Most of those did something extremely slow and
>> had no
>>  business being inlines. It's likely there are other instances of this to
>>  be found.
> 
>     Would there be any sense in letting gcc pick when to inline?
>     Gcc has -finline-functions -finline-limit=N which will
>     inline any function less than N pseudo instructions. Picking
>     a small enough value of N should automatically inline all
>     trivial accessors, and any other function small enough to
>     benefit. (The default is 600 which is probably too high
>     for the kernel).
> 
As a side-note here;

I someone could come up with a good way of identifying this I would be really
interested of it for pcc.  Currently I just inline anything declared inline.

-- Ragge


Home | Main Index | Thread Index | Old Index