Commit 5cc718b9dad682329a60e73547c6e708faa5bbe4
Committed by
Ingo Molnar
1 parent
8ea7f54410
Exists in
master
and in
4 other branches
kprobes: Hide CONFIG_OPTPROBES and set if arch supports optimized kprobes
Hide CONFIG_OPTPROBES and set if the arch supports optimized kprobes (IOW, HAVE_OPTPROBES=y), since this option doesn't change the major behavior of kprobes, and workarounds for minor changes are documented. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Dieter Ries <mail@dieterries.net> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20100315170054.31593.3153.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 2 changed files with 4 additions and 15 deletions Side-by-side Diff
Documentation/kprobes.txt
... | ... | @@ -165,8 +165,8 @@ |
165 | 165 | |
166 | 166 | 1.4 How Does Jump Optimization Work? |
167 | 167 | |
168 | -If you configured your kernel with CONFIG_OPTPROBES=y (currently | |
169 | -this option is supported on x86/x86-64, non-preemptive kernel) and | |
168 | +If your kernel is built with CONFIG_OPTPROBES=y (currently this flag | |
169 | +is automatically set 'y' on x86/x86-64, non-preemptive kernel) and | |
170 | 170 | the "debug.kprobes_optimization" kernel parameter is set to 1 (see |
171 | 171 | sysctl(8)), Kprobes tries to reduce probe-hit overhead by using a jump |
172 | 172 | instruction instead of a breakpoint instruction at each probepoint. |
... | ... | @@ -271,8 +271,6 @@ |
271 | 271 | using one of the following techniques: |
272 | 272 | - Specify an empty function for the kprobe's post_handler or break_handler. |
273 | 273 | or |
274 | -- Config CONFIG_OPTPROBES=n. | |
275 | - or | |
276 | 274 | - Execute 'sysctl -w debug.kprobes_optimization=n' |
277 | 275 | |
278 | 276 | 2. Architectures Supported |
... | ... | @@ -306,10 +304,6 @@ |
306 | 304 | it useful to "Compile the kernel with debug info" (CONFIG_DEBUG_INFO), |
307 | 305 | so you can use "objdump -d -l vmlinux" to see the source-to-object |
308 | 306 | code mapping. |
309 | - | |
310 | -If you want to reduce probing overhead, set "Kprobes jump optimization | |
311 | -support" (CONFIG_OPTPROBES) to "y". You can find this option under the | |
312 | -"Kprobes" line. | |
313 | 307 | |
314 | 308 | 4. API Reference |
315 | 309 |
arch/Kconfig
... | ... | @@ -42,15 +42,10 @@ |
42 | 42 | If in doubt, say "N". |
43 | 43 | |
44 | 44 | config OPTPROBES |
45 | - bool "Kprobes jump optimization support (EXPERIMENTAL)" | |
46 | - default y | |
47 | - depends on KPROBES | |
45 | + def_bool y | |
46 | + depends on KPROBES && HAVE_OPTPROBES | |
48 | 47 | depends on !PREEMPT |
49 | - depends on HAVE_OPTPROBES | |
50 | 48 | select KALLSYMS_ALL |
51 | - help | |
52 | - This option will allow kprobes to optimize breakpoint to | |
53 | - a jump for reducing its overhead. | |
54 | 49 | |
55 | 50 | config HAVE_EFFICIENT_UNALIGNED_ACCESS |
56 | 51 | bool |