aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-12-16 23:06:40 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-18 06:56:24 -0500
commitf38f1d2aa5a3520cf05da7cd6bd12fe2b0c509b7 (patch)
tree5eef795a1a081c41686971eaaa5ba2d1098ceb9d /kernel/sysctl.c
parent40874491f9e9a4cb08eaf663dbe018bf5671975a (diff)
trace: add a way to enable or disable the stack tracer
Impact: enhancement to stack tracer The stack tracer currently is either on when configured in or off when it is not. It can not be disabled when it is configured on. (besides disabling the function tracer that it uses) This patch adds a way to enable or disable the stack tracer at run time. It defaults off on bootup, but a kernel parameter 'stacktrace' has been added to enable it on bootup. A new sysctl has been added "kernel.stack_tracer_enabled" to let the user enable or disable the stack tracer at run time. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c83f566e940a..6ac501a2dcc6 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -487,6 +487,16 @@ static struct ctl_table kern_table[] = {
487 .proc_handler = &ftrace_enable_sysctl, 487 .proc_handler = &ftrace_enable_sysctl,
488 }, 488 },
489#endif 489#endif
490#ifdef CONFIG_STACK_TRACER
491 {
492 .ctl_name = CTL_UNNUMBERED,
493 .procname = "stack_tracer_enabled",
494 .data = &stack_tracer_enabled,
495 .maxlen = sizeof(int),
496 .mode = 0644,
497 .proc_handler = &stack_trace_sysctl,
498 },
499#endif
490#ifdef CONFIG_TRACING 500#ifdef CONFIG_TRACING
491 { 501 {
492 .ctl_name = CTL_UNNUMBERED, 502 .ctl_name = CTL_UNNUMBERED,