diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-11-22 11:25:43 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-06 08:34:01 +0100 |
commit | b79387ef185af2323594920923cecba5753c3817 (patch) | |
tree | 2c6d685794c30859cf3dde7316d02475cf9ad7cb /kernel/events | |
parent | 1d9b482e78d3b16f97f85a82849f82db7eed3102 (diff) | |
download | op-kernel-dev-b79387ef185af2323594920923cecba5753c3817.zip op-kernel-dev-b79387ef185af2323594920923cecba5753c3817.tar.gz |
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>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | 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; |