diff options
author | Abhishek Sagar <sagar.abhishek@gmail.com> | 2008-06-21 14:17:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-23 16:10:58 -0400 |
commit | ecea656d1d5e912d2f3d332657ea4a6d8380f891 (patch) | |
tree | fd139cdd762230bf4e55a1341ba29e2b309968b1 /include/linux/ftrace.h | |
parent | 785656a41f9a9c0e843a23d1ae05d900b5158f8f (diff) |
ftrace: freeze kprobe'd records
Let records identified as being kprobe'd be marked as "frozen". The trouble
with records which have a kprobe installed on their mcount call-site is
that they don't get updated. So if such a function which is currently being
traced gets its tracing disabled due to a new filter rule (or because it
was added to the notrace list) then it won't be updated and continue being
traced. This patch allows scanning of all frozen records during tracing to
check if they should be traced.
Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 366098d591de..3121b95443d9 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -49,6 +49,7 @@ enum { | |||
49 | FTRACE_FL_ENABLED = (1 << 3), | 49 | FTRACE_FL_ENABLED = (1 << 3), |
50 | FTRACE_FL_NOTRACE = (1 << 4), | 50 | FTRACE_FL_NOTRACE = (1 << 4), |
51 | FTRACE_FL_CONVERTED = (1 << 5), | 51 | FTRACE_FL_CONVERTED = (1 << 5), |
52 | FTRACE_FL_FROZEN = (1 << 6), | ||
52 | }; | 53 | }; |
53 | 54 | ||
54 | struct dyn_ftrace { | 55 | struct dyn_ftrace { |
@@ -73,15 +74,18 @@ extern void ftrace_caller(void); | |||
73 | extern void ftrace_call(void); | 74 | extern void ftrace_call(void); |
74 | extern void mcount_call(void); | 75 | extern void mcount_call(void); |
75 | 76 | ||
77 | extern int skip_trace(unsigned long ip); | ||
78 | |||
76 | void ftrace_disable_daemon(void); | 79 | void ftrace_disable_daemon(void); |
77 | void ftrace_enable_daemon(void); | 80 | void ftrace_enable_daemon(void); |
78 | 81 | ||
79 | #else | 82 | #else |
83 | # define skip_trace(ip) ({ 0; }) | ||
80 | # define ftrace_force_update() ({ 0; }) | 84 | # define ftrace_force_update() ({ 0; }) |
81 | # define ftrace_set_filter(buf, len, reset) do { } while (0) | 85 | # define ftrace_set_filter(buf, len, reset) do { } while (0) |
82 | # define ftrace_disable_daemon() do { } while (0) | 86 | # define ftrace_disable_daemon() do { } while (0) |
83 | # define ftrace_enable_daemon() do { } while (0) | 87 | # define ftrace_enable_daemon() do { } while (0) |
84 | #endif | 88 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
85 | 89 | ||
86 | /* totally disable ftrace - can not re-enable after this */ | 90 | /* totally disable ftrace - can not re-enable after this */ |
87 | void ftrace_kill(void); | 91 | void ftrace_kill(void); |