diff options
author | Xiaotian Feng <dfeng@redhat.com> | 2010-04-08 09:26:44 (GMT) |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2010-05-22 07:57:31 (GMT) |
commit | d3e14aa336b37df76ae875fa051dfdb0e765ddf9 (patch) | |
tree | da3b3e552002d0fc8d85d54b81f0b488b043e230 | |
parent | bbd7d57bfe852d9788bae5fb171c7edb4021d8ac (diff) | |
download | linux-d3e14aa336b37df76ae875fa051dfdb0e765ddf9.tar.xz |
slub: __kmalloc_node_track_caller should trace kmalloc_large_node case
commit 94b528d (kmemtrace: SLUB hooks for caller-tracking functions)
missed tracing kmalloc_large_node in __kmalloc_node_track_caller. We
should trace it same as __kmalloc_node.
Acked-by: David Rientjes <rientjes@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
-rw-r--r-- | mm/slub.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -3341,8 +3341,15 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, struct kmem_cache *s; void *ret; - if (unlikely(size > SLUB_MAX_SIZE)) - return kmalloc_large_node(size, gfpflags, node); + if (unlikely(size > SLUB_MAX_SIZE)) { + ret = kmalloc_large_node(size, gfpflags, node); + + trace_kmalloc_node(caller, ret, + size, PAGE_SIZE << get_order(size), + gfpflags, node); + + return ret; + } s = get_slab(size, gfpflags); |