Commit b79387ef authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

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: default avatarDeng-Cheng Zhu <dczhu@mips.com>
Tested-by: default avatarDeng-Cheng Zhu <dczhu@mips.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1322048382.14799.41.camel@twinsSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 1d9b482e
...@@ -2497,13 +2497,7 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx) ...@@ -2497,13 +2497,7 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
raw_spin_lock(&ctx->lock); raw_spin_lock(&ctx->lock);
task_ctx_sched_out(ctx); task_ctx_sched_out(ctx);
list_for_each_entry(event, &ctx->pinned_groups, group_entry) { list_for_each_entry(event, &ctx->event_list, event_entry) {
ret = event_enable_on_exec(event, ctx);
if (ret)
enabled = 1;
}
list_for_each_entry(event, &ctx->flexible_groups, group_entry) {
ret = event_enable_on_exec(event, ctx); ret = event_enable_on_exec(event, ctx);
if (ret) if (ret)
enabled = 1; enabled = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment