summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_sysprof.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-11-16 04:57:26 (GMT)
committerIngo Molnar <mingo@elte.hu>2008-11-16 06:55:23 (GMT)
commit1c80025a49855b12fa09bb6db71820e3367b1369 (patch)
tree063fe72ed9bb3410c3293c83a7882cecc46e7410 /kernel/trace/trace_sysprof.c
parente6e7a65aabdb696cf05a56cfd495c49a11fd4cde (diff)
downloadlinux-fsl-qoriq-1c80025a49855b12fa09bb6db71820e3367b1369.tar.xz
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_sysprof.c')
-rw-r--r--kernel/trace/trace_sysprof.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace_sysprof.c b/kernel/trace/trace_sysprof.c
index 05f7534..54960ed 100644
--- a/kernel/trace/trace_sysprof.c
+++ b/kernel/trace/trace_sysprof.c
@@ -261,11 +261,12 @@ static void stop_stack_trace(struct trace_array *tr)
mutex_unlock(&sample_timer_lock);
}
-static void stack_trace_init(struct trace_array *tr)
+static int stack_trace_init(struct trace_array *tr)
{
sysprof_trace = tr;
start_stack_trace(tr);
+ return 0;
}
static void stack_trace_reset(struct trace_array *tr)