tracing: Unify the logic for function tracing options
authorYordan Karadzhov (VMware) <y.karadz@gmail.com>
Thu, 15 Apr 2021 18:18:53 +0000 (21:18 +0300)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 15 Apr 2021 18:50:02 +0000 (14:50 -0400)
commit4994891ebbb89b18903637dc1c8f27b42cb8b8b2
tree3988a178e42d9e118e116042cbaa7fcc45fe97cc
parentc658797f1a70561205a224be0c8be64977ed64e8
tracing: Unify the logic for function tracing options

Currently the logic for dealing with the options for function tracing
has two different implementations. One is used when we set the flags
(in "static int func_set_flag()") and another used when we initialize
the tracer (in "static int function_trace_init()"). Those two
implementations are meant to do essentially the same thing and they
are both not very convenient for adding new options. In this patch
we add a helper function that provides a single implementation of
the logic for dealing with the options and we make it such that new
options can be easily added.

Link: https://lkml.kernel.org/r/20210415181854.147448-6-y.karadz@gmail.com
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_functions.c