diff options
| author | Frederic Weisbecker <fweisbec@gmail.com> | 2008-11-16 05:57:26 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-11-16 07:55:23 +0100 |
| commit | 1c80025a49855b12fa09bb6db71820e3367b1369 (patch) | |
| tree | 063fe72ed9bb3410c3293c83a7882cecc46e7410 /kernel/trace/trace_functions_return.c | |
| parent | tracing/ftrace: fix unexpected -EINVAL when longest tracer name is set (diff) | |
| download | linux-1c80025a49855b12fa09bb6db71820e3367b1369.tar.gz linux-1c80025a49855b12fa09bb6db71820e3367b1369.zip | |
tracing/ftrace: change the type of the init() callback
Impact: extend the ->init() method with the ability to fail
This bring a way to know if the initialization of a tracer successed.
A tracer must return 0 on success and a traditional error (ie:
-ENOMEM) if it fails.
If a tracer fails to init, it is free to print a detailed warn. The
tracing api will not and switch to a new tracer will just return the
error from the init callback.
Note: this will be used for the return tracer.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_functions_return.c')
| -rw-r--r-- | kernel/trace/trace_functions_return.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace_functions_return.c b/kernel/trace/trace_functions_return.c index 7680b21537dd..61185f756a13 100644 --- a/kernel/trace/trace_functions_return.c +++ b/kernel/trace/trace_functions_return.c @@ -24,13 +24,14 @@ static void stop_return_trace(struct trace_array *tr) unregister_ftrace_return(); } -static void return_trace_init(struct trace_array *tr) +static int return_trace_init(struct trace_array *tr) { int cpu; for_each_online_cpu(cpu) tracing_reset(tr, cpu); start_return_trace(tr); + return 0; } static void return_trace_reset(struct trace_array *tr) |
