]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/trace/trace_functions.c
ftrace: add function tracing to single thread
[mirror_ubuntu-bionic-kernel.git] / kernel / trace / trace_functions.c
index e90eb0c2c56ca78d917f4e353dd099fd51c29172..e74f6d0a321663b3610fb0e37d250c4fbf9696dc 100644 (file)
@@ -42,32 +42,28 @@ static void stop_function_trace(struct trace_array *tr)
        tracing_stop_cmdline_record();
 }
 
-static void function_trace_init(struct trace_array *tr)
+static int function_trace_init(struct trace_array *tr)
 {
-       if (tr->ctrl)
-               start_function_trace(tr);
+       start_function_trace(tr);
+       return 0;
 }
 
 static void function_trace_reset(struct trace_array *tr)
 {
-       if (tr->ctrl)
-               stop_function_trace(tr);
+       stop_function_trace(tr);
 }
 
-static void function_trace_ctrl_update(struct trace_array *tr)
+static void function_trace_start(struct trace_array *tr)
 {
-       if (tr->ctrl)
-               start_function_trace(tr);
-       else
-               stop_function_trace(tr);
+       function_reset(tr);
 }
 
 static struct tracer function_trace __read_mostly =
 {
-       .name        = "ftrace",
+       .name        = "function",
        .init        = function_trace_init,
        .reset       = function_trace_reset,
-       .ctrl_update = function_trace_ctrl_update,
+       .start       = function_trace_start,
 #ifdef CONFIG_FTRACE_SELFTEST
        .selftest    = trace_selftest_startup_function,
 #endif