tech-kern archive

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

Re: inline (Was: Bloat)

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).

        -finline-functions-called-once may also be of interest...

                David/absolute       -- No hype required --

Home | Main Index | Thread Index | Old Index