summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-05-23 15:27:46 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-05-25 22:13:39 -0400
commit17bb615ad4f8d2d2c0f02794d27d7f83e0009ef4 (patch)
tree6d312c4fc2c35c057e77f257ec9b82be0ce27cce /kernel/trace
parenta1cd6173596c6f7d1f0b41ac7d33ecf03c581edc (diff)
downloadblackbird-op-linux-17bb615ad4f8d2d2c0f02794d27d7f83e0009ef4.tar.gz
blackbird-op-linux-17bb615ad4f8d2d2c0f02794d27d7f83e0009ef4.zip
tracing: Have event with function tracer check error return
The self tests for event tracer does not check if the function tracing was successfully activated. It needs to before it continues the tests, otherwise the wrong errors may be reported. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_events.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 2fe110341359..686ec399f2a8 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1657,7 +1657,12 @@ static struct ftrace_ops trace_ops __initdata =
static __init void event_trace_self_test_with_function(void)
{
- register_ftrace_function(&trace_ops);
+ int ret;
+ ret = register_ftrace_function(&trace_ops);
+ if (WARN_ON(ret < 0)) {
+ pr_info("Failed to enable function tracer for event tests\n");
+ return;
+ }
pr_info("Running tests again, along with the function tracer\n");
event_trace_self_tests();
unregister_ftrace_function(&trace_ops);
OpenPOWER on IntegriCloud