]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace/x86: Have save_mcount_regs macro also save stack frames if needed
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Mon, 24 Nov 2014 23:08:48 +0000 (18:08 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 1 Dec 2014 19:08:27 +0000 (14:08 -0500)
commitce1e15fa525e9202efc6999bf2cffd78b5ebc12d
tree347410628424a2c146e00932b6f8d0a3bbbcb823
parentb0a5f7d5db6b22630fe1e30a4871f01fe139d3f4
ftrace/x86: Have save_mcount_regs macro also save stack frames if needed

The save_mcount_regs macro saves and restores the required mcount regs that
need to be saved before calling C code. It is done for all the function hook
utilities (static tracing, dynamic tracing, regs, function graph).

When frame pointers are enabled, the ftrace trampolines need to set up
frames and pointers such that a back trace (dump stack) can continue passed
them. Currently, a separate macro is used (create_frame) to do this, but
it's only done for the ftrace_caller and ftrace_reg_caller functions. It
is not done for the static tracer or function graph tracing.

Instead of having a separate macro doing the recording of the frames,
have the save_mcount_regs perform this task. This also has all tracers
saving the frame pointers when needed.

Link: http://lkml.kernel.org/r/CA+55aFwF+qCGSKdGaEgW4p6N65GZ5_XTV=1NbtWDvxnd5yYLiw@mail.gmail.com
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1411262304010.3961@nanos
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
arch/x86/kernel/mcount_64.S