linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Corey Ashford <cjashfor@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Stephane Eranian <eranian@googlemail.com>
Subject: Re: [BUG] perf_event: when events are grouped, the time enabled / running values are incorrect
Date: Wed, 12 May 2010 10:25:10 -0700	[thread overview]
Message-ID: <4BEAE476.1090100@linux.vnet.ibm.com> (raw)
In-Reply-To: <1273588935.1810.6.camel@laptop>

On 05/11/2010 07:42 AM, Peter Zijlstra wrote:
> ---
> Subject: perf: Fix exit() vs event-groups
> From: Peter Zijlstra<a.p.zijlstra@chello.nl>
> Date: Tue May 11 16:19:10 CEST 2010
>
> Corey reported that the value scale times of group siblings are not
> updated when the monitored task dies.
>
> The problem appears to be that we only update the group leader's
> time values, fix it by updating the whole group.
>
> Reported-by: Corey Ashford<cjashfor@linux.vnet.ibm.com>
> Signed-off-by: Peter Zijlstra<a.p.zijlstra@chello.nl>
> Cc: Paul Mackerras<paulus@samba.org>
> Cc: stable@kernel.org
> ---
>   kernel/perf_event.c |   44 +++++++++++++++++++++++---------------------
>   1 file changed, 23 insertions(+), 21 deletions(-)
>
> Index: linux-2.6/kernel/perf_event.c
> ===================================================================
> --- linux-2.6.orig/kernel/perf_event.c
> +++ linux-2.6/kernel/perf_event.c
> @@ -255,6 +255,18 @@ static void update_event_times(struct pe
>   	event->total_time_running = run_end - event->tstamp_running;
>   }
>
> +/*
> + * Update total_time_enabled and total_time_running for all events in a group.
> + */
...

Peter,

Thanks for looking into this problem!  Unfortunately, I've been unable 
to test your patch.  It doesn't apply to 2.6.33.3 and so I tried the 
-tip tree (which has this patch committed).  The kernel built fine, but 
crashed almost immediately during the boot-up process on my Power5 machine.

I don't have the crash details at hand, but they didn't look related to 
this perf change.

- Corey

  parent reply	other threads:[~2010-05-12 17:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-08  1:56 [BUG] perf_event: when events are grouped, the time enabled / running values are incorrect Corey Ashford
2010-05-08  2:24 ` Corey Ashford
2010-05-11 14:42 ` Peter Zijlstra
2010-05-11 15:43   ` [tip:perf/core] perf: Fix exit() vs event-groups tip-bot for Peter Zijlstra
2010-05-11 19:55   ` [BUG] perf_event: when events are grouped, the time enabled / running values are incorrect stephane eranian
2010-05-11 20:11     ` Peter Zijlstra
2010-05-11 20:23       ` Stephane Eranian
2010-05-11 20:27         ` Peter Zijlstra
2010-05-12 17:25   ` Corey Ashford [this message]
2010-05-12 17:50     ` Peter Zijlstra
2010-05-12 18:15       ` Corey Ashford
2010-05-12 18:42       ` Corey Ashford
2010-05-13  0:10     ` Paul Mackerras
2010-05-13 10:17       ` Paul Mackerras
2010-05-13 17:37         ` Corey Ashford

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=4BEAE476.1090100@linux.vnet.ibm.com \
    --to=cjashfor@linux.vnet.ibm.com \
    --cc=eranian@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).