From: tip-bot for Thomas Gleixner <tglx@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org,
eranian@google.com, paulus@samba.org, hpa@zytor.com,
mingo@redhat.com, a.p.zijlstra@chello.nl, efault@gmx.de,
imunsie@au1.ibm.com, fweisbec@gmail.com, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:perf/core] perf events: Fix event inherit fallout of precalculated headers
Date: Tue, 7 Dec 2010 06:54:51 GMT [thread overview]
Message-ID: <tip-614b6780eb0c393d2fb49ff62d61f29b877bd07e@git.kernel.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1012031245220.2653@localhost6.localdomain6>
Commit-ID: 614b6780eb0c393d2fb49ff62d61f29b877bd07e
Gitweb: http://git.kernel.org/tip/614b6780eb0c393d2fb49ff62d61f29b877bd07e
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Fri, 3 Dec 2010 16:24:32 -0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.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@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>
---
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);
next prev parent reply other threads:[~2010-12-07 6:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 19:39 [GIT PULL 0/4] perf/core improvements Arnaldo Carvalho de Melo
2010-12-02 19:39 ` [PATCH 1/4] perf events: Separate the routines handling the PERF_SAMPLE_ identity fields Arnaldo Carvalho de Melo
2010-12-03 5:40 ` Ian Munsie
2010-12-02 19:39 ` [PATCH 2/4] perf events: Make sample_type identity fields available in all PERF_RECORD_ events Arnaldo Carvalho de Melo
2010-12-03 5:45 ` Ian Munsie
2010-12-02 19:39 ` [PATCH 3/4] perf session: Parse sample earlier Arnaldo Carvalho de Melo
2010-12-03 5:46 ` Ian Munsie
2010-12-02 19:39 ` [PATCH 4/4] perf tools: Ask for ID PERF_SAMPLE_ info on all PERF_RECORD_ events Arnaldo Carvalho de Melo
2010-12-03 6:04 ` Ian Munsie
2010-12-02 23:00 ` [GIT PULL 0/4] perf/core improvements Thomas Gleixner
2010-12-03 0:44 ` Arnaldo Carvalho de Melo
2010-12-03 11:51 ` Thomas Gleixner
2010-12-07 6:54 ` tip-bot for Thomas Gleixner [this message]
2010-12-03 6:10 ` Ian Munsie
2010-12-03 13:05 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-614b6780eb0c393d2fb49ff62d61f29b877bd07e@git.kernel.org \
--to=tglx@linutronix.de \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=imunsie@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox