]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86/ftrace: Add -mfentry support to x86_32 with DYNAMIC_FTRACE set
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 23 Mar 2017 14:33:52 +0000 (10:33 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 24 Mar 2017 09:14:07 +0000 (10:14 +0100)
commit644e0e8dc76b919976c44d3929164d42cbe656bc
treee11a16a3e85b3138629648d44c3dc08d6bfc18df
parentff04b440d2d645fd8a5b3385b1b2e4d19d3fe746
x86/ftrace: Add -mfentry support to x86_32 with DYNAMIC_FTRACE set

x86_64 has had fentry support for some time. I did not add support to x86_32
as I was unsure if it will be used much in the future. It is still very much
used, and there's issues with function graph tracing with gcc playing around
with the mcount frames, causing function graph to panic. The fentry code
does not have this issue, and is able to cope as there is no frame to mess
up.

Note, this only adds support for fentry when DYNAMIC_FTRACE is set. There's
really no reason to not have that set, because the performance of the
machine drops significantly when it's not enabled.

Keep !DYNAMIC_FTRACE around to test it off, as there's still some archs
that have FTRACE but not DYNAMIC_FTRACE.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20170323143446.052202377@goodmis.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/Kconfig
arch/x86/kernel/ftrace_32.S