Re: [RFC] ftrace: Add support to keep some functions out of ftrace

Steven Rostedt
2022-07-23T03:54:07Z

On Fri, 22 Jul 2022 17:41:20 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> > I think I understand the fentry/ftrace equivalence you see, I remember
> > the perl mcount script ;-)
>
> It's even more than that. We worked with the compiler folks to get fentry
> for ftrace purposes (namely to speed it up, and not rely on frame
> pointers, which mcount did). fentry never existed until then. Like I said.
> fentry was created *for* ftrace. And currently it's x86 specific, as it
> relies on the calling convention that a call does both, push the return
> address onto the stack, and jump to a function. The blr
> (branch-link-register) method is more complex, which is where the
> "patchable" work comes from.

If you are interested in more details about the birth of fentry, here's
the email that started it all:

https://lore.kernel.org/lkml/1258657614.22249.824.camel@gandalf.stny.rr.com/

-- Steve