[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-614b6780eb0c393d2fb49ff62d61f29b877bd07e@git.kernel.org>
Date: Tue, 7 Dec 2010 06:54:51 GMT
From: tip-bot for Thomas Gleixner <tglx@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, eranian@...gle.com,
paulus@...ba.org, hpa@...or.com, mingo@...hat.com,
a.p.zijlstra@...llo.nl, efault@....de, imunsie@....ibm.com,
fweisbec@...il.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/core] perf events: Fix event inherit fallout of precalculated headers
Commit-ID: 614b6780eb0c393d2fb49ff62d61f29b877bd07e
Gitweb: http://git.kernel.org/tip/614b6780eb0c393d2fb49ff62d61f29b877bd07e
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Fri, 3 Dec 2010 16:24:32 -0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Sat, 4 Dec 2010 22:56:11 -0200
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@...il.com>
Cc: Ian Munsie <imunsie@....ibm.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
LKML-Reference: <alpine.LFD.2.00.1012031245220.2653@...alhost6.localdomain6>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
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 aede712..7961b27 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -6099,6 +6099,11 @@ inherit_event(struct perf_event *parent_event,
child_event->overflow_handler = parent_event->overflow_handler;
/*
+ * Precalculate sample_data sizes
+ */
+ perf_event__header_size(child_event);
+
+ /*
* Link it up in the child's context:
*/
raw_spin_lock_irqsave(&child_ctx->lock, flags);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists