public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@redhat.com>
To: Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>
Cc: systemtap <systemtap@sources.redhat.com>,
	DLE <dle-develop@lists.sourceforge.net>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	Dieter Ries <mail@dieterries.net>, Ingo Molnar <mingo@elte.hu>,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Subject: [PATCH -tip 1/3] kprobes: Hide CONFIG_OPTPROBES and set if arch support optimized kprobes
Date: Fri, 12 Mar 2010 18:22:09 -0500	[thread overview]
Message-ID: <20100312232208.2017.55337.stgit@localhost6.localdomain6> (raw)

Hide CONFIG_OPTPROBES and set if arch support optimized kprobes, since
this option doesn't change the behavior of kprobes, but just reduces
the overhead.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Dieter Ries <mail@dieterries.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
---

 Documentation/kprobes.txt |   10 ++--------
 arch/Kconfig              |    6 ++----
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 2f9115c..61c291c 100644
--- a/Documentation/kprobes.txt
+++ b/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/arch/Kconfig b/arch/Kconfig
index e5eb133..12f9dcc 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -42,11 +42,9 @@ 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


-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

             reply	other threads:[~2010-03-12 23:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12 23:22 Masami Hiramatsu [this message]
2010-03-12 23:22 ` [PATCH -tip 2/3] [BUGFIX] perf probe: Fix probe_point buffer overrun Masami Hiramatsu
2010-03-13 12:26   ` [tip:perf/urgent] " tip-bot for Masami Hiramatsu
2010-03-12 23:22 ` [PATCH -tip 3/3] [BUGFIX] perf probe: Set need_dwarf if lazy matching is used Masami Hiramatsu
2010-03-13 12:26   ` [tip:perf/urgent] perf probe: Fix need_dwarf flag " tip-bot for Masami Hiramatsu
2010-03-13  7:27 ` [PATCH -tip 1/3] kprobes: Hide CONFIG_OPTPROBES and set if arch support optimized kprobes Ingo Molnar
2010-03-15 17:00   ` [PATCH -tip v3] " Masami Hiramatsu
2010-03-16 14:47     ` [tip:perf/core] kprobes: Hide CONFIG_OPTPROBES and set if arch supports " tip-bot for Masami Hiramatsu
2010-03-14  0:15 ` [PATCH -tip 1/3] kprobes: Hide CONFIG_OPTPROBES and set if arch support " OGAWA Hirofumi
2010-03-14  2:05   ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100312232208.2017.55337.stgit@localhost6.localdomain6 \
    --to=mhiramat@redhat.com \
    --cc=ananth@in.ibm.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@dieterries.net \
    --cc=mingo@elte.hu \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox