]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3afbb441df3b764740c84f939e5131256072aad2
tree3988a178e42d9e118e116042cbaa7fcc45fe97cc
parent844b7e560c44d35427d9081b973d76d2538c9833
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