Skip to content

Commit 802c8a6

Browse files
Jiri OlsaIngo Molnar
authored andcommitted
Revert "perf: Do not allow optimized switch for non-cloned events"
This reverts commit 1f9a726. With the fix of the initial state for the cloned event we now correctly handle the error described in: 1f9a726 perf: Do not allow optimized switch for non-cloned events so we can revert it. I made an automated test for this, but its not suitable for automated perf tests framework. It needs to be customized for each machine (the more cpu the higher numbers for GROUPS/WORKERS/BYTES) and it could take longer time to hit the issue. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Stephane Eranian <eranian@google.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/20140910143535.GD2409@krava.brq.redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 1929def commit 802c8a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/events/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2375,7 +2375,7 @@ static void perf_event_context_sched_out(struct task_struct *task, int ctxn,
23752375
next_parent = rcu_dereference(next_ctx->parent_ctx);
23762376

23772377
/* If neither context have a parent context; they cannot be clones. */
2378-
if (!parent || !next_parent)
2378+
if (!parent && !next_parent)
23792379
goto unlock;
23802380

23812381
if (next_parent == ctx || next_ctx == parent || next_parent == parent) {

0 commit comments

Comments
 (0)