Loading Documentation/kprobes.txt +2 −8 Original line number Diff line number Diff line Loading @@ -165,8 +165,8 @@ the user entry_handler invocation is also skipped. 1.4 How Does Jump Optimization Work? If you configured your kernel with CONFIG_OPTPROBES=y (currently this option is supported on x86/x86-64, non-preemptive kernel) and If your kernel is built with CONFIG_OPTPROBES=y (currently this flag is automatically set 'y' on x86/x86-64, non-preemptive kernel) and the "debug.kprobes_optimization" kernel parameter is set to 1 (see sysctl(8)), Kprobes tries to reduce probe-hit overhead by using a jump instruction instead of a breakpoint instruction at each probepoint. Loading Loading @@ -271,8 +271,6 @@ tweak the kernel's execution path, you need to suppress optimization, using one of the following techniques: - Specify an empty function for the kprobe's post_handler or break_handler. or - Config CONFIG_OPTPROBES=n. or - Execute 'sysctl -w debug.kprobes_optimization=n' 2. Architectures Supported Loading Loading @@ -307,10 +305,6 @@ it useful to "Compile the kernel with debug info" (CONFIG_DEBUG_INFO), so you can use "objdump -d -l vmlinux" to see the source-to-object code mapping. If you want to reduce probing overhead, set "Kprobes jump optimization support" (CONFIG_OPTPROBES) to "y". You can find this option under the "Kprobes" line. 4. API Reference The Kprobes API includes a "register" function and an "unregister" Loading Documentation/trace/kprobetrace.txt +3 −1 Original line number Diff line number Diff line Loading @@ -41,6 +41,8 @@ Synopsis of kprobe_events $retval : Fetch return value.(*) +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**) NAME=FETCHARG : Set NAME as the argument name of FETCHARG. FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types (u8/u16/u32/u64/s8/s16/s32/s64) are supported. (*) only for return probe. (**) this is useful for fetching a field of data structures. Loading MAINTAINERS +5 −5 Original line number Diff line number Diff line Loading @@ -4353,13 +4353,13 @@ M: Paul Mackerras <paulus@samba.org> M: Ingo Molnar <mingo@elte.hu> M: Arnaldo Carvalho de Melo <acme@redhat.com> S: Supported F: kernel/perf_event.c F: kernel/perf_event*.c F: include/linux/perf_event.h F: arch/*/kernel/perf_event.c F: arch/*/kernel/*/perf_event.c F: arch/*/kernel/*/*/perf_event.c F: arch/*/kernel/perf_event*.c F: arch/*/kernel/*/perf_event*.c F: arch/*/kernel/*/*/perf_event*.c F: arch/*/include/asm/perf_event.h F: arch/*/lib/perf_event.c F: arch/*/lib/perf_event*.c F: arch/*/kernel/perf_callchain.c F: tools/perf/ Loading arch/Kconfig +2 −7 Original line number Diff line number Diff line Loading @@ -42,15 +42,10 @@ config KPROBES If in doubt, say "N". config OPTPROBES bool "Kprobes jump optimization support (EXPERIMENTAL)" default y depends on KPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT depends on HAVE_OPTPROBES select KALLSYMS_ALL help This option will allow kprobes to optimize breakpoint to a jump for reducing its overhead. config HAVE_EFFICIENT_UNALIGNED_ACCESS bool Loading arch/x86/Kconfig +3 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,9 @@ config X86 select HAVE_ARCH_KMEMCHECK select HAVE_USER_RETURN_NOTIFIER config INSTRUCTION_DECODER def_bool (KPROBES || PERF_EVENTS) config OUTPUT_FORMAT string default "elf32-i386" if X86_32 Loading Loading
Documentation/kprobes.txt +2 −8 Original line number Diff line number Diff line Loading @@ -165,8 +165,8 @@ the user entry_handler invocation is also skipped. 1.4 How Does Jump Optimization Work? If you configured your kernel with CONFIG_OPTPROBES=y (currently this option is supported on x86/x86-64, non-preemptive kernel) and If your kernel is built with CONFIG_OPTPROBES=y (currently this flag is automatically set 'y' on x86/x86-64, non-preemptive kernel) and the "debug.kprobes_optimization" kernel parameter is set to 1 (see sysctl(8)), Kprobes tries to reduce probe-hit overhead by using a jump instruction instead of a breakpoint instruction at each probepoint. Loading Loading @@ -271,8 +271,6 @@ tweak the kernel's execution path, you need to suppress optimization, using one of the following techniques: - Specify an empty function for the kprobe's post_handler or break_handler. or - Config CONFIG_OPTPROBES=n. or - Execute 'sysctl -w debug.kprobes_optimization=n' 2. Architectures Supported Loading Loading @@ -307,10 +305,6 @@ it useful to "Compile the kernel with debug info" (CONFIG_DEBUG_INFO), so you can use "objdump -d -l vmlinux" to see the source-to-object code mapping. If you want to reduce probing overhead, set "Kprobes jump optimization support" (CONFIG_OPTPROBES) to "y". You can find this option under the "Kprobes" line. 4. API Reference The Kprobes API includes a "register" function and an "unregister" Loading
Documentation/trace/kprobetrace.txt +3 −1 Original line number Diff line number Diff line Loading @@ -41,6 +41,8 @@ Synopsis of kprobe_events $retval : Fetch return value.(*) +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**) NAME=FETCHARG : Set NAME as the argument name of FETCHARG. FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types (u8/u16/u32/u64/s8/s16/s32/s64) are supported. (*) only for return probe. (**) this is useful for fetching a field of data structures. Loading
MAINTAINERS +5 −5 Original line number Diff line number Diff line Loading @@ -4353,13 +4353,13 @@ M: Paul Mackerras <paulus@samba.org> M: Ingo Molnar <mingo@elte.hu> M: Arnaldo Carvalho de Melo <acme@redhat.com> S: Supported F: kernel/perf_event.c F: kernel/perf_event*.c F: include/linux/perf_event.h F: arch/*/kernel/perf_event.c F: arch/*/kernel/*/perf_event.c F: arch/*/kernel/*/*/perf_event.c F: arch/*/kernel/perf_event*.c F: arch/*/kernel/*/perf_event*.c F: arch/*/kernel/*/*/perf_event*.c F: arch/*/include/asm/perf_event.h F: arch/*/lib/perf_event.c F: arch/*/lib/perf_event*.c F: arch/*/kernel/perf_callchain.c F: tools/perf/ Loading
arch/Kconfig +2 −7 Original line number Diff line number Diff line Loading @@ -42,15 +42,10 @@ config KPROBES If in doubt, say "N". config OPTPROBES bool "Kprobes jump optimization support (EXPERIMENTAL)" default y depends on KPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT depends on HAVE_OPTPROBES select KALLSYMS_ALL help This option will allow kprobes to optimize breakpoint to a jump for reducing its overhead. config HAVE_EFFICIENT_UNALIGNED_ACCESS bool Loading
arch/x86/Kconfig +3 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,9 @@ config X86 select HAVE_ARCH_KMEMCHECK select HAVE_USER_RETURN_NOTIFIER config INSTRUCTION_DECODER def_bool (KPROBES || PERF_EVENTS) config OUTPUT_FORMAT string default "elf32-i386" if X86_32 Loading