diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-14 00:16:56 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-14 00:16:56 -0400 |
| commit | fc8e1ead9314cf0e0f1922e661428b93d3a50d88 (patch) | |
| tree | f3cb97c4769b74f6627a59769f1ed5c92a13c58a /kernel/trace/trace_functions.c | |
| parent | 2bcaa6a4238094c5695d5b1943078388d82d3004 (diff) | |
| parent | 9de48cc300fb10f7d9faa978670becf5e352462a (diff) | |
Merge branch 'next' into for-linus
Diffstat (limited to 'kernel/trace/trace_functions.c')
| -rw-r--r-- | kernel/trace/trace_functions.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index c9a0b7df44ff..75ef000613c3 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
| @@ -193,9 +193,11 @@ static void tracing_start_function_trace(void) | |||
| 193 | static void tracing_stop_function_trace(void) | 193 | static void tracing_stop_function_trace(void) |
| 194 | { | 194 | { |
| 195 | ftrace_function_enabled = 0; | 195 | ftrace_function_enabled = 0; |
| 196 | /* OK if they are not registered */ | 196 | |
| 197 | unregister_ftrace_function(&trace_stack_ops); | 197 | if (func_flags.val & TRACE_FUNC_OPT_STACK) |
| 198 | unregister_ftrace_function(&trace_ops); | 198 | unregister_ftrace_function(&trace_stack_ops); |
| 199 | else | ||
| 200 | unregister_ftrace_function(&trace_ops); | ||
| 199 | } | 201 | } |
| 200 | 202 | ||
| 201 | static int func_set_flag(u32 old_flags, u32 bit, int set) | 203 | static int func_set_flag(u32 old_flags, u32 bit, int set) |
| @@ -300,8 +302,7 @@ ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, | |||
| 300 | if (count == -1) | 302 | if (count == -1) |
| 301 | seq_printf(m, ":unlimited\n"); | 303 | seq_printf(m, ":unlimited\n"); |
| 302 | else | 304 | else |
| 303 | seq_printf(m, ":count=%ld", count); | 305 | seq_printf(m, ":count=%ld\n", count); |
| 304 | seq_putc(m, '\n'); | ||
| 305 | 306 | ||
| 306 | return 0; | 307 | return 0; |
| 307 | } | 308 | } |
| @@ -362,7 +363,7 @@ ftrace_trace_onoff_callback(char *glob, char *cmd, char *param, int enable) | |||
| 362 | out_reg: | 363 | out_reg: |
| 363 | ret = register_ftrace_function_probe(glob, ops, count); | 364 | ret = register_ftrace_function_probe(glob, ops, count); |
| 364 | 365 | ||
| 365 | return ret; | 366 | return ret < 0 ? ret : 0; |
| 366 | } | 367 | } |
| 367 | 368 | ||
| 368 | static struct ftrace_func_command ftrace_traceon_cmd = { | 369 | static struct ftrace_func_command ftrace_traceon_cmd = { |
