From: tip-bot for Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, tglx@linutronix.de, mingo@elte.hu,
dczhu@mips.com
Subject: [tip:perf/core] perf: Fix enable_on_exec for sibling events
Date: Tue, 6 Dec 2011 01:47:20 -0800 [thread overview]
Message-ID: <tip-b79387ef185af2323594920923cecba5753c3817@git.kernel.org> (raw)
In-Reply-To: <1322048382.14799.41.camel@twins>
Commit-ID: b79387ef185af2323594920923cecba5753c3817
Gitweb: http://git.kernel.org/tip/b79387ef185af2323594920923cecba5753c3817
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
AuthorDate: Tue, 22 Nov 2011 11:25:43 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 6 Dec 2011 08:34:01 +0100
perf: Fix enable_on_exec for sibling events
Deng-Cheng Zhu reported that sibling events that were created disabled
with enable_on_exec would never get enabled. Iterate all events
instead of the group lists.
Reported-by: Deng-Cheng Zhu <dczhu@mips.com>
Tested-by: Deng-Cheng Zhu <dczhu@mips.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1322048382.14799.41.camel@twins
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/events/core.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index eeda540..3c1541d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -2497,13 +2497,7 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
raw_spin_lock(&ctx->lock);
task_ctx_sched_out(ctx);
- list_for_each_entry(event, &ctx->pinned_groups, group_entry) {
- ret = event_enable_on_exec(event, ctx);
- if (ret)
- enabled = 1;
- }
-
- list_for_each_entry(event, &ctx->flexible_groups, group_entry) {
+ list_for_each_entry(event, &ctx->event_list, event_entry) {
ret = event_enable_on_exec(event, ctx);
if (ret)
enabled = 1;
prev parent reply other threads:[~2011-12-06 9:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 3:30 [PATCH v2 5/5] perf: Enable applicable siblings when group leader is enable-on-exec Deng-Cheng Zhu
2011-11-22 10:51 ` Peter Zijlstra
2011-11-22 13:24 ` Zhu, DengCheng
2011-11-22 13:45 ` Peter Zijlstra
2011-11-22 14:20 ` Zhu, DengCheng
2011-11-22 14:23 ` Peter Zijlstra
2011-11-23 3:38 ` Deng-Cheng Zhu
2011-11-23 11:39 ` Peter Zijlstra
2011-11-23 12:40 ` Zhu, DengCheng
2011-11-23 12:48 ` Peter Zijlstra
2011-11-24 3:06 ` Deng-Cheng Zhu
2011-12-06 9:47 ` tip-bot for Peter Zijlstra [this message]
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=tip-b79387ef185af2323594920923cecba5753c3817@git.kernel.org \
--to=a.p.zijlstra@chello.nl \
--cc=dczhu@mips.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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