aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>2013-05-09 01:44:54 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-05-09 20:22:16 -0400
commitb8820084f2130b3dcfb09c78ac16cdd2194a345b (patch)
tree5cfc6d47197adcbebff40c42fc17fea8d6246887 /kernel/trace
parent41a7dd420c57323391d58b553318c1fad8e7ebc2 (diff)
tracing/kprobes: Support soft-mode disabling
Support soft-mode disabling on kprobe-based dynamic events. Soft-disabling is just ignoring recording if the soft disabled flag is set. Link: http://lkml.kernel.org/r/20130509054454.30398.7237.stgit@mhiramat-M0-7522 Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Tom Zanussi <tom.zanussi@intel.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_kprobe.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index fee865d8a7c4..636d45fe69b3 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -845,6 +845,9 @@ __kprobe_trace_func(struct trace_probe *tp, struct pt_regs *regs,
845 845
846 WARN_ON(call != ftrace_file->event_call); 846 WARN_ON(call != ftrace_file->event_call);
847 847
848 if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &ftrace_file->flags))
849 return;
850
848 local_save_flags(irq_flags); 851 local_save_flags(irq_flags);
849 pc = preempt_count(); 852 pc = preempt_count();
850 853
@@ -893,6 +896,9 @@ __kretprobe_trace_func(struct trace_probe *tp, struct kretprobe_instance *ri,
893 896
894 WARN_ON(call != ftrace_file->event_call); 897 WARN_ON(call != ftrace_file->event_call);
895 898
899 if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &ftrace_file->flags))
900 return;
901
896 local_save_flags(irq_flags); 902 local_save_flags(irq_flags);
897 pc = preempt_count(); 903 pc = preempt_count();
898 904