Messages in this thread Patch in this message | | | Date | Fri, 3 Dec 2010 12:51:03 +0100 (CET) | From | Thomas Gleixner <> | Subject | Re: [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);
| |