cvs commit: src/sys/dev/rp rp.c

John Baldwin jhb at
Wed Jul 23 11:53:23 PDT 2003

On 23-Jul-2003 Poul-Henning Kamp wrote:
> In message <XFMail.20030723142400.jhb at>, John Baldwin writes:
>>On 23-Jul-2003 Poul-Henning Kamp wrote:
>>> phk         2003/07/23 11:03:23 PDT
>>>   FreeBSD src repository
>>>   Modified files:
>>>     sys/dev/rp           rp.c 
>>>   Log:
>>>   Undo single-intance inlining which is way above the comfort limit for GCC.
>>Single instance inlining can not hurt.  It can help by reducing call
>>stack depth and code size however.  I thought you were for reducing code
>>size, not increasing it.  Please use __always_inline to shut up gcc
>>instead of de-inlining for single instance inlines.
> Please provide data showing actual improvement for inlining.

   text    data     bss     dec     hex filename
  23554     440    1088   25082    61fa rp.o.both
  23421     440    1088   24949    6175 rp.o.non
  23394     440    1088   24922    615a rp.o.recv

Inlining both is worse than inlining neither, but inlining just
rp_do_receive() saves a whopping 27 bytes.  Even inlining both
is just a difference of 133 bytes or almost 0.5% of the code.

> If I changed this to __always_inline, I would change the code generated,
> to start inlining these functions.  We don't know the effect of that.

Bull.  We've been inlining these functions in 4.x and the like for quite
some time since if I'm reading things correctly gcc didn't start to refuse
inlining until gcc 3.x.

> Instead I preserve the status quo by removing the inline request which
> GCC ignores.

No, you are just setting the results of a gcc bug in stone.  In FreeBSD
< 5.0 the status quo is to inline, and there are a lot more of those
releases than 5.0 and 5.1.


John Baldwin <jhb at>  <><
"Power Users Use the Power to Serve!"  -

More information about the cvs-all mailing list