Re: [PATCH] kmemtrace: SLAB hooks.

From: Pekka Enberg
Date: Mon Jul 14 2008 - 12:28:50 EST


Hi Eduard-Gabriel,

On Sat, 2008-07-12 at 22:04 +0300, Eduard - Gabriel Munteanu wrote:
> This adds hooks for the SLAB allocator, to allow tracing with kmemtrace.
>
> Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@xxxxxxxxxxx>
> @@ -28,8 +29,20 @@ extern struct cache_sizes malloc_sizes[];
> void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
> void *__kmalloc(size_t size, gfp_t flags);
>
> +#ifdef CONFIG_KMEMTRACE
> +extern void *__kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags);
> +#else
> +static inline void *__kmem_cache_alloc(struct kmem_cache *cachep,
> + gfp_t flags)
> +{
> + return __kmem_cache_alloc(cachep, flags);

Looks as if the function calls itself ïrecursively?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/