[PATCH v2 1/2] arm64: implement FTRACE_WITH_REGS
From: rostedt@goodmis.org (Steven Rostedt)
Date: 2016-07-08 21:08:20
Also in:
linux-arch, lkml
From: rostedt@goodmis.org (Steven Rostedt)
Date: 2016-07-08 21:08:20
Also in:
linux-arch, lkml
On Fri, 8 Jul 2016 22:24:55 +0200 Torsten Duwe [off-list ref] wrote:
On Fri, Jul 08, 2016 at 11:57:10AM -0400, Steven Rostedt wrote:quoted
On Fri, 8 Jul 2016 10:48:24 -0500 Josh Poimboeuf [off-list ref] wrote:quoted
Here, with -fprolog-pad, it's already a nop, so no change is needed.Yes, exactly.quoted
That's what I was thinking. But as I stated in another email (probably in the air when you wrote this), the call to ftrace_modify_code() may be completely circumvented by ftrace_make_nop() if the addr is MCOUNT_ADDR.Only on the _first_ invocation. Later on, tracing can be switched on and off, and then the instructions need to be changed just like with fentry (or profile-kernel ;-)
Understood, but ftrace_modify_code() will only receive addr == MCOUNT_ADDR on boot up or when a module is loaded. In both cases, with -fprolog-pad it will already be a nop, hence no need to call ftrace_modify_code(), in those cases. In all other cases, addr will point to a ftrace trampoline. -- Steve