lkml.org 
[lkml]   [2014]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86: bpf_jit_comp: Reduce is_ereg() code size
From
Date
On Thu, 2014-12-04 at 15:14 -0800, Eric Dumazet wrote:
> On Thu, 2014-12-04 at 15:00 -0800, Joe Perches wrote:
> > Use the (1 << reg) & mask trick to reduce code size.
[]
> Really, the root cause of this is the 'inline' abuse in non fast paths
> for non trivial functions.

There is no object size change with is_ereg()
defined "static inline" or "static"

Curiously, if you mark it noinline, the size increases.

gcc 4.9.1, x86-64, -O2 no profiling support

$ size arch/x86/net/bpf_jit_comp.o.st*
text data bss dec hex filename
10679 4 0 10683 29bb arch/x86/net/bpf_jit_comp.o.static_inline
11535 4 0 11539 2d13 arch/x86/net/bpf_jit_comp.o.static_noinline
10679 4 0 10683 29bb arch/x86/net/bpf_jit_comp.o.static_without_inline




\
 
 \ /
  Last update: 2014-12-05 03:41    [W:0.176 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site