diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2008-11-15 23:57:26 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-16 01:55:23 -0500 |
commit | 1c80025a49855b12fa09bb6db71820e3367b1369 (patch) | |
tree | 063fe72ed9bb3410c3293c83a7882cecc46e7410 /kernel/trace/trace_boot.c | |
parent | e6e7a65aabdb696cf05a56cfd495c49a11fd4cde (diff) |
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_boot.c')
-rw-r--r-- | kernel/trace/trace_boot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c index cb333b7fd113..a4fa2c57e34e 100644 --- a/kernel/trace/trace_boot.c +++ b/kernel/trace/trace_boot.c | |||
@@ -47,7 +47,7 @@ static void reset_boot_trace(struct trace_array *tr) | |||
47 | tracing_reset(tr, cpu); | 47 | tracing_reset(tr, cpu); |
48 | } | 48 | } |
49 | 49 | ||
50 | static void boot_trace_init(struct trace_array *tr) | 50 | static int boot_trace_init(struct trace_array *tr) |
51 | { | 51 | { |
52 | int cpu; | 52 | int cpu; |
53 | boot_trace = tr; | 53 | boot_trace = tr; |
@@ -56,6 +56,7 @@ static void boot_trace_init(struct trace_array *tr) | |||
56 | tracing_reset(tr, cpu); | 56 | tracing_reset(tr, cpu); |
57 | 57 | ||
58 | tracing_sched_switch_assign_trace(tr); | 58 | tracing_sched_switch_assign_trace(tr); |
59 | return 0; | ||
59 | } | 60 | } |
60 | 61 | ||
61 | static enum print_line_t | 62 | static enum print_line_t |