ftrace: Remove #ifdef from code and add clear_ftrace_function_probes() stub
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 18 May 2017 01:53:32 +0000 (21:53 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 18 May 2017 01:53:32 +0000 (21:53 -0400)
No need to add ugly #ifdefs in the code. Having a standard stub file is much
prettier.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace.c
kernel/trace/trace.h

index 664c44a6d48fa638a7333c3ad6240b19e465cb90..fcc9a2d774c3244c8d087d93b2700af238b54578 100644 (file)
@@ -7550,9 +7550,7 @@ static int instance_rmdir(const char *name)
        }
 
        tracing_set_nop(tr);
-#if defined(CONFIG_FUNCTION_TRACER) && defined(CONFIG_DYNAMIC_FTRACE)
        clear_ftrace_function_probes(tr);
-#endif
        event_trace_del_tracer(tr);
        ftrace_clear_pids(tr);
        ftrace_destroy_function_files(tr);
index 98e0845f7235870b3ac5cacc4e432cc0de4a6e11..39fd77330aabb12a68d2104d9c20e81ea739f20e 100644 (file)
@@ -999,6 +999,10 @@ static inline __init int unregister_ftrace_command(char *cmd_name)
 {
        return -EINVAL;
 }
+static inline void clear_ftrace_function_probes(struct trace_array *tr)
+{
+}
+
 /*
  * The ops parameter passed in is usually undefined.
  * This must be a macro.