[RFC PATCH -next v2 3/4] arm64/ftrace: support dynamically allocated trampolines

Steven Rostedt rostedt at goodmis.org
Thu Apr 21 07:08:59 PDT 2022


On Thu, 21 Apr 2022 10:06:39 -0400
Steven Rostedt <rostedt at goodmis.org> wrote:

> Without this change, because the arch does not support dynamically
> allocated trampolines, it means that all these ftrace_ops will be
> registered to the same trampoline. That means, for every function that is
> traced, it will loop through all 10 of theses ftrace_ops and check their
> hashes to see if their callback should be called or not.

Oh, I forgot to mention. If you then enable function tracer that traces
*every function*, then *every function* will be going through this loop of
the 10 ftrace_ops!

With dynamically allocated trampolines, then most functions will just call
the trampoline that handles the function tracer directly.

-- Steve



More information about the linux-arm-kernel mailing list