public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Namhyung Kim <namhyung.kim@lge.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] perf: Remove duplicate invocation on perf_event_for_each
Date: Thu, 31 May 2012 19:00:00 +0200	[thread overview]
Message-ID: <1338483600.28384.66.camel@twins> (raw)
In-Reply-To: <1338443506-25009-1-git-send-email-namhyung.kim@lge.com>

On Thu, 2012-05-31 at 14:51 +0900, Namhyung Kim wrote:
> The @func callback was invoked twice for group leader
> when perf_event_for_each() called. It seems the commit
> 75f937f24bd9 ("perf_counter: Fix ctx->mutex vs counter
> ->mutex inversion") made the mistake during the change.
> 
> Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>

Good spotting, thanks!

> ---
>  kernel/events/core.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 5b06cbbf6931..f85c0154b333 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -3181,7 +3181,6 @@ static void perf_event_for_each(struct perf_event *event,
>  	event = event->group_leader;
>  
>  	perf_event_for_each_child(event, func);
> -	func(event);
>  	list_for_each_entry(sibling, &event->sibling_list, group_entry)
>  		perf_event_for_each_child(sibling, func);
>  	mutex_unlock(&ctx->mutex);


  parent reply	other threads:[~2012-05-31 17:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-31  5:51 [PATCH 1/3] perf: Remove duplicate invocation on perf_event_for_each Namhyung Kim
2012-05-31  5:51 ` [PATCH 2/3] perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP Namhyung Kim
2012-05-31 14:35   ` Arnaldo Carvalho de Melo
2012-05-31 14:37     ` Arnaldo Carvalho de Melo
2012-06-06  7:03   ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2012-05-31  5:51 ` [PATCH 3/3] perf evlist: Pass third argument to ioctl explicitly Namhyung Kim
2012-06-06  7:04   ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2012-05-31 17:00 ` Peter Zijlstra [this message]
2012-06-06  7:09 ` [tip:perf/urgent] perf: Remove duplicate invocation on perf_event_for_each tip-bot for Namhyung Kim

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=1338483600.28384.66.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@gmail.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