All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ian Munsie <imunsie@au1.ibm.com>, Mike Galbraith <efault@gmx.de>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [GIT PULL 0/4] perf/core improvements
Date: Fri, 3 Dec 2010 12:51:03 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.1012031245220.2653@localhost6.localdomain6> (raw)
In-Reply-To: <20101203004406.GA18492@ghostprotocols.net>

On Thu, 2 Dec 2010, Arnaldo Carvalho de Melo wrote:
> Em Fri, Dec 03, 2010 at 12:00:09AM +0100, Thomas Gleixner escreveu:
> > Investigating. Please wait
> 
> Thanks, as I said on IRC, perhaps I neglected the non-perf bits of perf

It's a perf bit of perf. You simply broke the inheritance
code. Testing perf with something more complex than "sleep 1" might
have shown this :)

------------>

Subject: perf: Fix event inherit fallout of precalculated headers
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 03 Dec 2010 11:42:10 +0100

The precalculated header size is not updated when an event is inherited. That
results in bogus sample entries for all child events.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/perf_event.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: linux-2.6-tip/kernel/perf_event.c
===================================================================
--- linux-2.6-tip.orig/kernel/perf_event.c
+++ linux-2.6-tip/kernel/perf_event.c
@@ -6184,6 +6184,12 @@ inherit_event(struct perf_event *parent_
 	child_event->overflow_handler = parent_event->overflow_handler;
 
 	/*
+	 * Precalculate sample_data sizes
+	 */
+	perf_event__header_size(child_event);
+	perf_event__id_header_size(child_event);
+
+	/*
 	 * Link it up in the child's context:
 	 */
 	raw_spin_lock_irqsave(&child_ctx->lock, flags);

  reply	other threads:[~2010-12-03 11:51 UTC|newest]

Thread overview: 17+ 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 [this message]
2010-12-07  6:54       ` [tip:perf/core] perf events: Fix event inherit fallout of precalculated headers tip-bot for Thomas Gleixner
2010-12-03  6:10 ` [GIT PULL 0/4] perf/core improvements Ian Munsie
2010-12-03 13:05   ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2010-08-10 21:53 Arnaldo Carvalho de Melo
2010-08-11  6:35 ` Ingo Molnar

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=alpine.LFD.2.00.1012031245220.2653@localhost6.localdomain6 \
    --to=tglx@linutronix.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=imunsie@au1.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.