OSDN Git Service

ftrace/x86: Add a counter to test function_graph with direct
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 8 Nov 2019 18:12:57 +0000 (13:12 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 13 Nov 2019 14:36:49 +0000 (09:36 -0500)
commita3ad1a7e39689005cb04a4f2adb82f9d55b4724f
tree64deafb73e244d233836735dd2fa6a3c41462cc6
parent562955fe6a558b9ef98ad87c470314946338cb2f
ftrace/x86: Add a counter to test function_graph with direct

As testing for direct calls from the function graph tracer adds a little
overhead (which is a lot when tracing every function), add a counter that
can be used to test if function_graph tracer needs to test for a direct
caller or not.

It would have been nicer if we could use a static branch, but the static
branch logic fails when used within the function graph tracer trampoline.

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