diff options
Diffstat (limited to 'kernel/trace/trace_functions.c')
-rw-r--r-- | kernel/trace/trace_functions.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index 0f85a64003d3..e74f6d0a3216 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -42,24 +42,20 @@ static void stop_function_trace(struct trace_array *tr) | |||
42 | tracing_stop_cmdline_record(); | 42 | tracing_stop_cmdline_record(); |
43 | } | 43 | } |
44 | 44 | ||
45 | static void function_trace_init(struct trace_array *tr) | 45 | static int function_trace_init(struct trace_array *tr) |
46 | { | 46 | { |
47 | if (tr->ctrl) | 47 | start_function_trace(tr); |
48 | start_function_trace(tr); | 48 | return 0; |
49 | } | 49 | } |
50 | 50 | ||
51 | static void function_trace_reset(struct trace_array *tr) | 51 | static void function_trace_reset(struct trace_array *tr) |
52 | { | 52 | { |
53 | if (tr->ctrl) | 53 | stop_function_trace(tr); |
54 | stop_function_trace(tr); | ||
55 | } | 54 | } |
56 | 55 | ||
57 | static void function_trace_ctrl_update(struct trace_array *tr) | 56 | static void function_trace_start(struct trace_array *tr) |
58 | { | 57 | { |
59 | if (tr->ctrl) | 58 | function_reset(tr); |
60 | start_function_trace(tr); | ||
61 | else | ||
62 | stop_function_trace(tr); | ||
63 | } | 59 | } |
64 | 60 | ||
65 | static struct tracer function_trace __read_mostly = | 61 | static struct tracer function_trace __read_mostly = |
@@ -67,7 +63,7 @@ static struct tracer function_trace __read_mostly = | |||
67 | .name = "function", | 63 | .name = "function", |
68 | .init = function_trace_init, | 64 | .init = function_trace_init, |
69 | .reset = function_trace_reset, | 65 | .reset = function_trace_reset, |
70 | .ctrl_update = function_trace_ctrl_update, | 66 | .start = function_trace_start, |
71 | #ifdef CONFIG_FTRACE_SELFTEST | 67 | #ifdef CONFIG_FTRACE_SELFTEST |
72 | .selftest = trace_selftest_startup_function, | 68 | .selftest = trace_selftest_startup_function, |
73 | #endif | 69 | #endif |