lkml.org 
[lkml]   [2008]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 4/4] kmemtrace: SLOB hooks.
On Tue, Jul 22, 2008 at 03:53:55PM -0500, Matt Mackall wrote:
>
> On Tue, 2008-07-22 at 21:36 +0300, Eduard - Gabriel Munteanu wrote:
> > -static inline void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags)
> > +static __always_inline void *kmem_cache_alloc(struct kmem_cache *cachep,
> > + gfp_t flags)
> > {
> > return kmem_cache_alloc_node(cachep, flags, -1);
> > }
>
> Why is this needed? builtin_return?

If we don't use __always_inline, we can't be sure whether it's inlined
or not. And we don't know if we need _THIS_IP_ or _RET_IP_ (equivalent
to __builtin_return_address(0)). Simple, plain 'inline' does not
guarantee GCC will inline that function, nor does it warn us if it is
not inlined.



\
 
 \ /
  Last update: 2008-07-22 23:11    [W:0.088 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site