aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2011-03-07 21:27:09 +0100
committerIngo Molnar <mingo@elte.hu>2011-03-16 14:04:14 +0100
commita0f7d0f7fc02465bb9758501f611f63381792996 (patch)
treeefa09496d88cb336cc855fe407ccd40ddef7f7fb
parent91b2f482e62ad0d444222253026a5cbca28c4ab9 (diff)
downloadkernel_samsung_espresso10-a0f7d0f7fc02465bb9758501f611f63381792996.zip
kernel_samsung_espresso10-a0f7d0f7fc02465bb9758501f611f63381792996.tar.gz
kernel_samsung_espresso10-a0f7d0f7fc02465bb9758501f611f63381792996.tar.bz2
perf: Handle stopped state with tracepoints
We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Stephane Eranian <eranian@google.com> Cc: <stable@kernel.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1299529629-18280-2-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/perf_event.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 974e2e6..533f715 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -5478,6 +5478,8 @@ static int perf_tp_event_match(struct perf_event *event,
struct perf_sample_data *data,
struct pt_regs *regs)
{
+ if (event->hw.state & PERF_HES_STOPPED)
+ return 0;
/*
* All tracepoints are from kernel-space.
*/