From ebb50efd57d82413c6f99005301e58b5a57138ed Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Mon, 15 Mar 2010 13:00:54 -0400 Subject: [PATCH] --- yaml --- r: 191095 b: refs/heads/master c: 5cc718b9dad682329a60e73547c6e708faa5bbe4 h: refs/heads/master i: 191093: a043c9cec12e153333d4bf826ab67d005cacd7b4 191091: e409f3a2beb28887fa64ab3459bd4d65d533b1ea 191087: 465edd7b6873e2f541e85cffb238adf92295ca30 v: v3 --- [refs] | 2 +- trunk/Documentation/kprobes.txt | 10 ++-------- trunk/arch/Kconfig | 9 ++------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index f2a130af701f..695304930953 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8ea7f544100844307072cae2f5fc108afdef999a +refs/heads/master: 5cc718b9dad682329a60e73547c6e708faa5bbe4 diff --git a/trunk/Documentation/kprobes.txt b/trunk/Documentation/kprobes.txt index 2f9115c0ae62..61c291cddf18 100644 --- a/trunk/Documentation/kprobes.txt +++ b/trunk/Documentation/kprobes.txt @@ -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. @@ -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 @@ -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" diff --git a/trunk/arch/Kconfig b/trunk/arch/Kconfig index e5eb1337a537..f06010fb4838 100644 --- a/trunk/arch/Kconfig +++ b/trunk/arch/Kconfig @@ -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