Messages in this thread | | | Date | Wed, 23 Jul 2008 00:07:52 +0300 | From | Eduard - Gabriel Munteanu <> | Subject | Re: [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.
| |