summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-11-26 15:04:10 +0800
committerIngo Molnar <mingo@elte.hu>2009-11-26 09:14:02 +0100
commit53d0422c2d10808fddb2c30859193bfea164c7e3 (patch)
treec0131ec3cdff711873af7177fc29403091944aaa /mm
parent925684d6d589e40e41007edf47c69e729d911263 (diff)
downloadlinux-3.10-53d0422c2d10808fddb2c30859193bfea164c7e3.tar.gz
linux-3.10-53d0422c2d10808fddb2c30859193bfea164c7e3.tar.bz2
linux-3.10-53d0422c2d10808fddb2c30859193bfea164c7e3.zip
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.c4
-rw-r--r--mm/util.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2bc2ac63f41..bdb22f55d00 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -48,12 +48,14 @@
#include <linux/page_cgroup.h>
#include <linux/debugobjects.h>
#include <linux/kmemleak.h>
-#include <trace/events/kmem.h>
#include <asm/tlbflush.h>
#include <asm/div64.h>
#include "internal.h"
+#define CREATE_TRACE_POINTS
+#include <trace/events/kmem.h>
+
/*
* Array of node states.
*/
diff --git a/mm/util.c b/mm/util.c
index 7c35ad95f92..15d197571b4 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -6,9 +6,6 @@
#include <linux/sched.h>
#include <asm/uaccess.h>
-#define CREATE_TRACE_POINTS
-#include <trace/events/kmem.h>
-
/**
* kstrdup - allocate space for and copy an existing string
* @s: the string to duplicate