]> git.baikalelectronics.ru Git - kernel.git/commit
x86/ftrace: Make function graph use ftrace directly
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 8 Oct 2021 09:13:31 +0000 (11:13 +0200)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 21 Oct 2021 03:44:43 +0000 (23:44 -0400)
commit477f4c0fcc150af74818698309e8f8f562a7db2c
tree59c3f8fe9cfa47a20889f8264b6f6a12f27ccfeb
parentf239f3bc9bf82fa40be5d3b0aad3ab282d70efcc
x86/ftrace: Make function graph use ftrace directly

We don't need special hook for graph tracer entry point,
but instead we can use graph_ops::func function to install
the return_hooker.

This moves the graph tracing setup _before_ the direct
trampoline prepares the stack, so the return_hooker will
be called when the direct trampoline is finished.

This simplifies the code, because we don't need to take into
account the direct trampoline setup when preparing the graph
tracer hooker and we can allow function graph tracer on entries
registered with direct trampoline.

Link: https://lkml.kernel.org/r/20211008091336.33616-4-jolsa@kernel.org
[fixed compile error reported by kernel test robot <lkp@intel.com>]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/x86/include/asm/ftrace.h
arch/x86/kernel/ftrace.c
arch/x86/kernel/ftrace_64.S
include/linux/ftrace.h
kernel/trace/fgraph.c