diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2010-02-25 08:34:15 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-25 11:49:25 -0500 |
commit | b2be84df99ebc93599c69e931a3c4a5105abfabc (patch) | |
tree | 35f720b12bed1cc98c7d261dc3a6af96916faa44 /kernel/sysctl.c | |
parent | afd66255b9a48f5851326ddae50e2203fbf71dc9 (diff) |
kprobes: Jump optimization sysctl interface
Add /proc/sys/debug/kprobes-optimization sysctl which enables
and disables kprobes jump optimization on the fly for debugging.
Changes in v7:
- Remove ctl_name = CTL_UNNUMBERED for upstream compatibility.
Changes in v6:
- Update comments and coding style.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Anders Kaseorg <andersk@ksplice.com>
Cc: Tim Abbott <tabbott@ksplice.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
LKML-Reference: <20100225133415.6725.8274.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8a68b2448468..40d791d616b5 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/ftrace.h> | 50 | #include <linux/ftrace.h> |
51 | #include <linux/slow-work.h> | 51 | #include <linux/slow-work.h> |
52 | #include <linux/perf_event.h> | 52 | #include <linux/perf_event.h> |
53 | #include <linux/kprobes.h> | ||
53 | 54 | ||
54 | #include <asm/uaccess.h> | 55 | #include <asm/uaccess.h> |
55 | #include <asm/processor.h> | 56 | #include <asm/processor.h> |
@@ -1450,6 +1451,17 @@ static struct ctl_table debug_table[] = { | |||
1450 | .proc_handler = proc_dointvec | 1451 | .proc_handler = proc_dointvec |
1451 | }, | 1452 | }, |
1452 | #endif | 1453 | #endif |
1454 | #if defined(CONFIG_OPTPROBES) | ||
1455 | { | ||
1456 | .procname = "kprobes-optimization", | ||
1457 | .data = &sysctl_kprobes_optimization, | ||
1458 | .maxlen = sizeof(int), | ||
1459 | .mode = 0644, | ||
1460 | .proc_handler = proc_kprobes_optimization_handler, | ||
1461 | .extra1 = &zero, | ||
1462 | .extra2 = &one, | ||
1463 | }, | ||
1464 | #endif | ||
1453 | { } | 1465 | { } |
1454 | }; | 1466 | }; |
1455 | 1467 | ||