diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-12-03 13:24:32 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-12-04 19:56:11 -0500 |
commit | 614b6780eb0c393d2fb49ff62d61f29b877bd07e (patch) | |
tree | 6c366435b7960dfa84f5592486a2fad8f4526205 /kernel/perf_event.c | |
parent | e4b546a3643fbfc510d5ef7db538e4d3ab00effb (diff) |
perf events: Fix event inherit fallout of precalculated headers
The precalculated header size is not updated when an event is inherited. That
results in bogus sample entries for all child events. Bug introduced in c320c7b.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ian Munsie <imunsie@au1.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <alpine.LFD.2.00.1012031245220.2653@localhost6.localdomain6>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index aede71245e9f..7961b27aceea 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -6099,6 +6099,11 @@ inherit_event(struct perf_event *parent_event, | |||
6099 | child_event->overflow_handler = parent_event->overflow_handler; | 6099 | child_event->overflow_handler = parent_event->overflow_handler; |
6100 | 6100 | ||
6101 | /* | 6101 | /* |
6102 | * Precalculate sample_data sizes | ||
6103 | */ | ||
6104 | perf_event__header_size(child_event); | ||
6105 | |||
6106 | /* | ||
6102 | * Link it up in the child's context: | 6107 | * Link it up in the child's context: |
6103 | */ | 6108 | */ |
6104 | raw_spin_lock_irqsave(&child_ctx->lock, flags); | 6109 | raw_spin_lock_irqsave(&child_ctx->lock, flags); |