diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-11-17 23:04:15 +0100 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-11-18 17:42:09 +0100 |
commit | ea806eb3eab35528b578a061b2c4b28f0f92c465 (patch) | |
tree | 2004cf417ab559434f4e42f0e34b7b112328f546 /kernel/trace/fgraph.c | |
parent | ftrace: Add helper find_direct_entry() to consolidate code (diff) | |
download | linux-ea806eb3eab35528b578a061b2c4b28f0f92c465.tar.xz linux-ea806eb3eab35528b578a061b2c4b28f0f92c465.zip |
ftrace: Add a helper function to modify_ftrace_direct() to allow arch optimization
If a direct ftrace callback is at a location that does not have any other
ftrace helpers attached to it, it is possible to simply just change the
text to call the new caller (if the architecture supports it). But this
requires special architecture code. Currently, modify_ftrace_direct() uses a
trick to add a stub ftrace callback to the location forcing it to call the
ftrace iterator. Then it can change the direct helper to call the new
function in C, and then remove the stub. Removing the stub will have the
location now call the new location that the direct helper is using.
The new helper function does the registering the stub trick, but is a weak
function, allowing an architecture to override it to do something a bit more
direct.
Link: https://lore.kernel.org/r/20191115215125.mbqv7taqnx376yed@ast-mbp.dhcp.thefacebook.com
Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/fgraph.c')
0 files changed, 0 insertions, 0 deletions