diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-01-18 09:12:32 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-01-25 10:49:46 -0800 |
commit | 9607f0688fe1db11f19ff43940fe4697845ec9da (patch) | |
tree | 0fd2df7b7af5878a11c8aa97dd4a0eb3ee17ff44 | |
parent | b0a93920c4117933657cb5572157ce502ef0fc57 (diff) | |
download | lwn-9607f0688fe1db11f19ff43940fe4697845ec9da.tar.gz lwn-9607f0688fe1db11f19ff43940fe4697845ec9da.zip |
perf: Honour event state for aux stream data
commit 22e190851f8709c48baf00ed9ce6144cdc54d025 upstream.
Anton reported that perf record kept receiving events even after calling
ioctl(PERF_EVENT_IOC_DISABLE). It turns out that FORK,COMM and MMAP
events didn't respect the disabled state and kept flowing in.
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Anton Blanchard <anton@samba.org>
LKML-Reference: <1263459187.4244.265.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | kernel/perf_event.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 6e9a31030783..413d101ca8ee 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -3229,6 +3229,9 @@ static void perf_event_task_output(struct perf_event *event, static int perf_event_task_match(struct perf_event *event) { + if (event->state != PERF_EVENT_STATE_ACTIVE) + return 0; + if (event->cpu != -1 && event->cpu != smp_processor_id()) return 0; @@ -3344,6 +3347,9 @@ static void perf_event_comm_output(struct perf_event *event, static int perf_event_comm_match(struct perf_event *event) { + if (event->state != PERF_EVENT_STATE_ACTIVE) + return 0; + if (event->cpu != -1 && event->cpu != smp_processor_id()) return 0; @@ -3471,6 +3477,9 @@ static void perf_event_mmap_output(struct perf_event *event, static int perf_event_mmap_match(struct perf_event *event, struct perf_mmap_event *mmap_event) { + if (event->state != PERF_EVENT_STATE_ACTIVE) + return 0; + if (event->cpu != -1 && event->cpu != smp_processor_id()) return 0; |