diff options
author | Abhishek Sagar <sagar.abhishek@gmail.com> | 2008-06-21 14:17:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-23 16:10:56 -0400 |
commit | 395a59d0f8e86bb39cd700c3d185d30c670bb958 (patch) | |
tree | 1558e635efcede901c5dbe9acd625d475db5b369 /kernel/trace | |
parent | f34bfb1beef8a17ba3d46b60f8fa19ffedc1ed8d (diff) |
ftrace: store mcount address in rec->ip
Record the address of the mcount call-site. Currently all archs except sparc64
record the address of the instruction following the mcount call-site. Some
general cleanups are entailed. Storing mcount addresses in rec->ip enables
looking them up in the kprobe hash table later on to check if they're kprobe'd.
Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com>
Cc: davem@davemloft.net
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 0d5bcf69952d..f1e9e5c74e64 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/hash.h> | 27 | #include <linux/hash.h> |
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | 29 | ||
30 | #include <asm/ftrace.h> | ||
31 | |||
30 | #include "trace.h" | 32 | #include "trace.h" |
31 | 33 | ||
32 | /* ftrace_enabled is a method to turn ftrace on or off */ | 34 | /* ftrace_enabled is a method to turn ftrace on or off */ |
@@ -329,7 +331,6 @@ ftrace_record_ip(unsigned long ip) | |||
329 | } | 331 | } |
330 | 332 | ||
331 | #define FTRACE_ADDR ((long)(ftrace_caller)) | 333 | #define FTRACE_ADDR ((long)(ftrace_caller)) |
332 | #define MCOUNT_ADDR ((long)(mcount)) | ||
333 | 334 | ||
334 | static int | 335 | static int |
335 | __ftrace_replace_code(struct dyn_ftrace *rec, | 336 | __ftrace_replace_code(struct dyn_ftrace *rec, |