perf_events: Fix broken event grouping
authorStephane Eranian <eranian@google.com>
Fri, 17 Sep 2010 09:28:47 +0000 (11:28 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 17 Sep 2010 10:48:47 +0000 (12:48 +0200)
commitd14b12d7adbf214f33eb59f800b5c3d5ed9268e8
tree005705157545c70db6b751f38ae28702714fb1ed
parent74704ac6ea402d50c9543cb28247e6d9f521f7ae
perf_events: Fix broken event grouping

Events were not grouped anymore. The reason was that in
perf_event_open(), the field event->group_leader was
initialized before the function looked up the group_fd
to find the event leader. This patch fixes this by
reordering the code correctly.

Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
LKML-Reference: <20100917093009.360420946@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c