perf_events: Fix FORK events
authorPeter Zijlstra <peterz@infradead.org>
Sun, 14 Feb 2010 10:12:04 +0000 (11:12 +0100)
committerIngo Molnar <mingo@elte.hu>
Sun, 14 Feb 2010 17:10:39 +0000 (18:10 +0100)
commit6f93d0a7c83772997b81c30d6f519a9a5dbab6a9
treefd937bfb57964c514db2186e58c896fb7dc30647
parent1a72cfa6856e7d58e049c42c6e6a789669478479
perf_events: Fix FORK events

Commit 22e19085 ("Honour event state for aux stream data")
introduced a bug where we would drop FORK events.

The thing is that we deliver FORK events to the child process'
event, which at that time will be PERF_EVENT_STATE_INACTIVE
because the child won't be scheduled in (we're in the middle of
fork).

Solve this twice, change the event state filter to exclude only
disabled (STATE_OFF) or worse, and deliver FORK events to the
current (parent).

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Anton Blanchard <anton@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
LKML-Reference: <1266142324.5273.411.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c