aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_kprobe.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2009-09-14 16:49:37 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2009-09-16 22:04:01 -0400
commit5a0d9050db4d1147722b42afef9011251b2651ee (patch)
tree1d3b3e080d4b3d1bf34d0a551ee3c06be0852331 /kernel/trace/trace_kprobe.c
parent74ebb63e7cd25f6fb02a45fc2ea7735bce1217c9 (diff)
tracing/kprobes: Disable kprobe events by default after creation
Disable newly created kprobe events by default, not to disturb another user using ftrace. "Disturb" means when someone is using ftrace and another user tries to use perf-tools, (in near future) if he defines new kprobe event via perf-tools, then new events will mess up the frace buffer. Fix this to allow proper and transparent kprobes events concurrent usage between ftrace users and perf users. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Jim Keniston <jkenisto@us.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Frank Ch. Eigler <fche@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jason Baron <jbaron@redhat.com> Cc: K.Prasad <prasad@linux.vnet.ibm.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <20090914204937.18779.59422.stgit@dhcp-100-2-132.bos.redhat.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace_kprobe.c')
-rw-r--r--kernel/trace/trace_kprobe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index d8db9357489b..f6821f16227e 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -383,7 +383,7 @@ static int register_trace_probe(struct trace_probe *tp)
383 goto end; 383 goto end;
384 } 384 }
385 385
386 tp->flags = TP_FLAG_TRACE; 386 tp->rp.kp.flags |= KPROBE_FLAG_DISABLED;
387 if (probe_is_return(tp)) 387 if (probe_is_return(tp))
388 ret = register_kretprobe(&tp->rp); 388 ret = register_kretprobe(&tp->rp);
389 else 389 else
@@ -1298,7 +1298,7 @@ static int register_probe_event(struct trace_probe *tp)
1298 call->id = register_ftrace_event(&tp->event); 1298 call->id = register_ftrace_event(&tp->event);
1299 if (!call->id) 1299 if (!call->id)
1300 return -ENODEV; 1300 return -ENODEV;
1301 call->enabled = 1; 1301 call->enabled = 0;
1302 call->regfunc = probe_event_enable; 1302 call->regfunc = probe_event_enable;
1303 call->unregfunc = probe_event_disable; 1303 call->unregfunc = probe_event_disable;
1304 1304