perf: Fix the software events state check
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 7 Mar 2011 20:27:08 +0000 (21:27 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 16 Mar 2011 13:04:13 +0000 (14:04 +0100)
Fix the mistakenly inverted check of events state.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: <stable@kernel.org>
LKML-Reference: <1299529629-18280-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c

index ed253aa24ba491d5861671aeedb636a9a9ad8a55..974e2e64a43a49e8d569032f995afcd620cecc50 100644 (file)
@@ -5122,7 +5122,7 @@ static int perf_exclude_event(struct perf_event *event,
                              struct pt_regs *regs)
 {
        if (event->hw.state & PERF_HES_STOPPED)
-               return 0;
+               return 1;
 
        if (regs) {
                if (event->attr.exclude_user && user_mode(regs))