lkml.org 
[lkml]   [2010]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [GIT PULL 0/4] perf/core improvements
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);

\
 
 \ /
  Last update: 2010-12-03 12:53    [W:0.068 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site