ftrace: Move the recursion testing into global headers
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 6 Nov 2020 02:32:36 +0000 (21:32 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 6 Nov 2020 13:33:23 +0000 (08:33 -0500)
commit0264c8c9e1b53e9dbb41fae5e54756e84644bc60
tree63d5169796dea5946cdc81a091c57d72e64c1195
parent645f224e7ba2f4200bf163153d384ceb0de5462e
ftrace: Move the recursion testing into global headers

Currently, if a callback is registered to a ftrace function and its
ftrace_ops does not have the RECURSION flag set, it is encapsulated in a
helper function that does the recursion for it.

Really, all the callbacks should have their own recursion protection for
performance reasons. But they should not all implement their own. Move the
recursion helpers to global headers, so that all callbacks can use them.

Link: https://lkml.kernel.org/r/20201028115612.460535535@goodmis.org
Link: https://lkml.kernel.org/r/20201106023546.166456258@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/ftrace.h
include/linux/trace_recursion.h [new file with mode: 0644]
kernel/trace/trace.h