diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-31 02:31:57 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-31 02:31:57 -0500 |
commit | a9de18eb761f7c1c860964b2e5addc1a35c7e861 (patch) | |
tree | 886e75fdfd09690cd262ca69cb7f5d1d42b48602 /kernel/trace/trace_functions.c | |
parent | b2aaf8f74cdc84a9182f6cabf198b7763bcb9d40 (diff) | |
parent | 6a94cb73064c952255336cc57731904174b2c58f (diff) |
Merge branch 'linus' into stackprotector
Conflicts:
arch/x86/include/asm/pda.h
kernel/fork.c
Diffstat (limited to 'kernel/trace/trace_functions.c')
-rw-r--r-- | kernel/trace/trace_functions.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index 312144897970..9236d7e25a16 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -16,20 +16,10 @@ | |||
16 | 16 | ||
17 | #include "trace.h" | 17 | #include "trace.h" |
18 | 18 | ||
19 | static void function_reset(struct trace_array *tr) | ||
20 | { | ||
21 | int cpu; | ||
22 | |||
23 | tr->time_start = ftrace_now(tr->cpu); | ||
24 | |||
25 | for_each_online_cpu(cpu) | ||
26 | tracing_reset(tr->data[cpu]); | ||
27 | } | ||
28 | |||
29 | static void start_function_trace(struct trace_array *tr) | 19 | static void start_function_trace(struct trace_array *tr) |
30 | { | 20 | { |
31 | tr->cpu = get_cpu(); | 21 | tr->cpu = get_cpu(); |
32 | function_reset(tr); | 22 | tracing_reset_online_cpus(tr); |
33 | put_cpu(); | 23 | put_cpu(); |
34 | 24 | ||
35 | tracing_start_cmdline_record(); | 25 | tracing_start_cmdline_record(); |
@@ -42,32 +32,28 @@ static void stop_function_trace(struct trace_array *tr) | |||
42 | tracing_stop_cmdline_record(); | 32 | tracing_stop_cmdline_record(); |
43 | } | 33 | } |
44 | 34 | ||
45 | static void function_trace_init(struct trace_array *tr) | 35 | static int function_trace_init(struct trace_array *tr) |
46 | { | 36 | { |
47 | if (tr->ctrl) | 37 | start_function_trace(tr); |
48 | start_function_trace(tr); | 38 | return 0; |
49 | } | 39 | } |
50 | 40 | ||
51 | static void function_trace_reset(struct trace_array *tr) | 41 | static void function_trace_reset(struct trace_array *tr) |
52 | { | 42 | { |
53 | if (tr->ctrl) | 43 | stop_function_trace(tr); |
54 | stop_function_trace(tr); | ||
55 | } | 44 | } |
56 | 45 | ||
57 | static void function_trace_ctrl_update(struct trace_array *tr) | 46 | static void function_trace_start(struct trace_array *tr) |
58 | { | 47 | { |
59 | if (tr->ctrl) | 48 | tracing_reset_online_cpus(tr); |
60 | start_function_trace(tr); | ||
61 | else | ||
62 | stop_function_trace(tr); | ||
63 | } | 49 | } |
64 | 50 | ||
65 | static struct tracer function_trace __read_mostly = | 51 | static struct tracer function_trace __read_mostly = |
66 | { | 52 | { |
67 | .name = "ftrace", | 53 | .name = "function", |
68 | .init = function_trace_init, | 54 | .init = function_trace_init, |
69 | .reset = function_trace_reset, | 55 | .reset = function_trace_reset, |
70 | .ctrl_update = function_trace_ctrl_update, | 56 | .start = function_trace_start, |
71 | #ifdef CONFIG_FTRACE_SELFTEST | 57 | #ifdef CONFIG_FTRACE_SELFTEST |
72 | .selftest = trace_selftest_startup_function, | 58 | .selftest = trace_selftest_startup_function, |
73 | #endif | 59 | #endif |