diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-12-11 02:45:30 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-11 03:17:02 -0500 |
commit | 0f24f1287a86b198c1e4bd4ce45e8565e40ff804 (patch) | |
tree | 7d13bfec87c7b67ffc701271484dc8d96080643c /mm/slub.c | |
parent | 125580380f418000b1a06d9a54700f1191b6e561 (diff) |
tracing, slab: Define kmem_cache_alloc_notrace ifdef CONFIG_TRACING
Define kmem_trace_alloc_{,node}_notrace() if CONFIG_TRACING is
enabled, otherwise perf-kmem will show wrong stats ifndef
CONFIG_KMEM_TRACE, because a kmalloc() memory allocation may
be traced by both trace_kmalloc() and trace_kmem_cache_alloc().
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-mm@kvack.org <linux-mm@kvack.org>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
LKML-Reference: <4B21F89A.7000801@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1754,7 +1754,7 @@ void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags) | |||
1754 | } | 1754 | } |
1755 | EXPORT_SYMBOL(kmem_cache_alloc); | 1755 | EXPORT_SYMBOL(kmem_cache_alloc); |
1756 | 1756 | ||
1757 | #ifdef CONFIG_KMEMTRACE | 1757 | #ifdef CONFIG_TRACING |
1758 | void *kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags) | 1758 | void *kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags) |
1759 | { | 1759 | { |
1760 | return slab_alloc(s, gfpflags, -1, _RET_IP_); | 1760 | return slab_alloc(s, gfpflags, -1, _RET_IP_); |
@@ -1775,7 +1775,7 @@ void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t gfpflags, int node) | |||
1775 | EXPORT_SYMBOL(kmem_cache_alloc_node); | 1775 | EXPORT_SYMBOL(kmem_cache_alloc_node); |
1776 | #endif | 1776 | #endif |
1777 | 1777 | ||
1778 | #ifdef CONFIG_KMEMTRACE | 1778 | #ifdef CONFIG_TRACING |
1779 | void *kmem_cache_alloc_node_notrace(struct kmem_cache *s, | 1779 | void *kmem_cache_alloc_node_notrace(struct kmem_cache *s, |
1780 | gfp_t gfpflags, | 1780 | gfp_t gfpflags, |
1781 | int node) | 1781 | int node) |