lkml.org 
[lkml]   [2012]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRE: [RFC] net: bpf_jit: Two pass JIT and other changes
From
On Mon, April 2, 2012 19:28, David Laight wrote:
>
>> 1) Sadly, gcc isn't always smart enough to inline emit_code().
>> So turn it into a macro to force gcc to inline it. This saves
>> about 500 bytes. Tested with gcc 4.6.0. An alternative to the
>> macro would be to create inline emit_code1(), emit_code2() etc.
>
> Does giving it the __attribute__((always_inline)) help?
> I had to mark a load of small static functions that way
> after a minor change (possibly to the overall size)
> stopped gcc inlining everything.

I did try that first, but it didn't work for some reason. Perhaps
the kernel uses some flag that overrides it when optimising for size.
Maybe plain -Os does that already, I don't know.

Greetings,

Indan




\
 
 \ /
  Last update: 2012-04-02 14:05    [W:0.085 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site