diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-11-26 02:04:10 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-26 03:14:02 -0500 |
commit | 53d0422c2d10808fddb2c30859193bfea164c7e3 (patch) | |
tree | c0131ec3cdff711873af7177fc29403091944aaa /mm | |
parent | 925684d6d589e40e41007edf47c69e729d911263 (diff) |
tracing: Convert some kmem events to DEFINE_EVENT
Use DECLARE_EVENT_CLASS to remove duplicate code:
text data bss dec hex filename
333987 69800 27228 431015 693a7 mm/built-in.o.old
330030 69800 27228 427058 68432 mm/built-in.o
8 events are converted:
kmem_alloc: kmalloc, kmem_cache_alloc
kmem_alloc_node: kmalloc_node, kmem_cache_alloc_node
kmem_free: kfree, kmem_cache_free
mm_page: mm_page_alloc_zone_locked, mm_page_pcpu_drain
No change in functionality.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
LKML-Reference: <4B0E286A.2000405@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 4 | ||||
-rw-r--r-- | mm/util.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2bc2ac63f41e..bdb22f55d006 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -48,12 +48,14 @@ | |||
48 | #include <linux/page_cgroup.h> | 48 | #include <linux/page_cgroup.h> |
49 | #include <linux/debugobjects.h> | 49 | #include <linux/debugobjects.h> |
50 | #include <linux/kmemleak.h> | 50 | #include <linux/kmemleak.h> |
51 | #include <trace/events/kmem.h> | ||
52 | 51 | ||
53 | #include <asm/tlbflush.h> | 52 | #include <asm/tlbflush.h> |
54 | #include <asm/div64.h> | 53 | #include <asm/div64.h> |
55 | #include "internal.h" | 54 | #include "internal.h" |
56 | 55 | ||
56 | #define CREATE_TRACE_POINTS | ||
57 | #include <trace/events/kmem.h> | ||
58 | |||
57 | /* | 59 | /* |
58 | * Array of node states. | 60 | * Array of node states. |
59 | */ | 61 | */ |
@@ -6,9 +6,6 @@ | |||
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <asm/uaccess.h> | 7 | #include <asm/uaccess.h> |
8 | 8 | ||
9 | #define CREATE_TRACE_POINTS | ||
10 | #include <trace/events/kmem.h> | ||
11 | |||
12 | /** | 9 | /** |
13 | * kstrdup - allocate space for and copy an existing string | 10 | * kstrdup - allocate space for and copy an existing string |
14 | * @s: the string to duplicate | 11 | * @s: the string to duplicate |