diff options
author | Zhaolei <zhaolei@cn.fujitsu.com> | 2009-04-10 02:26:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-12 09:22:55 -0400 |
commit | 02af61bb50f5d5f0322dbe5ab2a0d75808d25c7b (patch) | |
tree | fa087ed8a584d7b66016e6a1421e538369d52e5a /include/trace | |
parent | abd41443ac76d3e9c29a8c1d9e9a3312306cc55e (diff) |
tracing, kmemtrace: Separate include/trace/kmemtrace.h to kmemtrace part and tracepoint part
Impact: refactor code for future changes
Current kmemtrace.h is used both as header file of kmemtrace and kmem's
tracepoints definition.
Tracepoints' definition file may be used by other code, and should only have
definition of tracepoint.
We can separate include/trace/kmemtrace.h into 2 files:
include/linux/kmemtrace.h: header file for kmemtrace
include/trace/kmem.h: definition of kmem tracepoints
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Acked-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <49DEE68A.5040902@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/kmem.h (renamed from include/trace/kmemtrace.h) | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/include/trace/kmemtrace.h b/include/trace/kmem.h index 28ee69f9cd46..24d251928182 100644 --- a/include/trace/kmemtrace.h +++ b/include/trace/kmem.h | |||
@@ -1,25 +1,9 @@ | |||
1 | /* | 1 | #ifndef _TRACE_KMEM_H |
2 | * Copyright (C) 2008 Eduard - Gabriel Munteanu | 2 | #define _TRACE_KMEM_H |
3 | * | ||
4 | * This file is released under GPL version 2. | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_KMEMTRACE_H | ||
8 | #define _LINUX_KMEMTRACE_H | ||
9 | |||
10 | #ifdef __KERNEL__ | ||
11 | 3 | ||
12 | #include <linux/tracepoint.h> | 4 | #include <linux/tracepoint.h> |
13 | #include <linux/types.h> | 5 | #include <linux/types.h> |
14 | 6 | ||
15 | #ifdef CONFIG_KMEMTRACE | ||
16 | extern void kmemtrace_init(void); | ||
17 | #else | ||
18 | static inline void kmemtrace_init(void) | ||
19 | { | ||
20 | } | ||
21 | #endif | ||
22 | |||
23 | DECLARE_TRACE(kmalloc, | 7 | DECLARE_TRACE(kmalloc, |
24 | TP_PROTO(unsigned long call_site, | 8 | TP_PROTO(unsigned long call_site, |
25 | const void *ptr, | 9 | const void *ptr, |
@@ -57,7 +41,4 @@ DECLARE_TRACE(kmem_cache_free, | |||
57 | TP_PROTO(unsigned long call_site, const void *ptr), | 41 | TP_PROTO(unsigned long call_site, const void *ptr), |
58 | TP_ARGS(call_site, ptr)); | 42 | TP_ARGS(call_site, ptr)); |
59 | 43 | ||
60 | #endif /* __KERNEL__ */ | 44 | #endif /* _TRACE_KMEM_H */ |
61 | |||
62 | #endif /* _LINUX_KMEMTRACE_H */ | ||
63 | |||