summaryrefslogtreecommitdiffstats
path: root/arch/Kconfig
diff options
context:
space:
mode:
authorCheng Jian2019-05-04 13:39:39 +0200
committerSteven Rostedt (VMware)2019-05-26 05:04:43 +0200
commita124692b698b00026a58d89831ceda2331b2e1d0 (patch)
tree1634d4db5c810306171db808559b7c59637dcfcf /arch/Kconfig
parenttracing/kprobe: Do not run kprobe boot tests if kprobe_event is on cmdline (diff)
downloadkernel-qcow2-linux-a124692b698b00026a58d89831ceda2331b2e1d0.tar.gz
kernel-qcow2-linux-a124692b698b00026a58d89831ceda2331b2e1d0.tar.xz
kernel-qcow2-linux-a124692b698b00026a58d89831ceda2331b2e1d0.zip
ftrace: Enable trampoline when rec count returns back to one
Custom trampolines can only be enabled if there is only a single ops attached to it. If there's only a single callback registered to a function, and the ops has a trampoline registered for it, then we can call the trampoline directly. This is very useful for improving the performance of ftrace and livepatch. If more than one callback is registered to a function, the general trampoline is used, and the custom trampoline is not restored back to the direct call even if all the other callbacks were unregistered and we are back to one callback for the function. To fix this, set FTRACE_FL_TRAMP flag if rec count is decremented to one, and the ops that left has a trampoline. Testing After this patch : insmod livepatch_unshare_files.ko cat /sys/kernel/debug/tracing/enabled_functions unshare_files (1) R I tramp: 0xffffffffc0000000(klp_ftrace_handler+0x0/0xa0) ->ftrace_ops_assist_func+0x0/0xf0 echo unshare_files > /sys/kernel/debug/tracing/set_ftrace_filter echo function > /sys/kernel/debug/tracing/current_tracer cat /sys/kernel/debug/tracing/enabled_functions unshare_files (2) R I ->ftrace_ops_list_func+0x0/0x150 echo nop > /sys/kernel/debug/tracing/current_tracer cat /sys/kernel/debug/tracing/enabled_functions unshare_files (1) R I tramp: 0xffffffffc0000000(klp_ftrace_handler+0x0/0xa0) ->ftrace_ops_assist_func+0x0/0xf0 Link: http://lkml.kernel.org/r/1556969979-111047-1-git-send-email-cj.chengjian@huawei.com Signed-off-by: Cheng Jian <cj.chengjian@huawei.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'arch/Kconfig')
0 files changed, 0 insertions, 0 deletions