perf: Clean up sync_child_event()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 26 Jan 2016 12:06:56 +0000 (13:06 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 29 Jan 2016 07:35:32 +0000 (08:35 +0100)
commit8ba289b8d4e4dbd1f971fbf0d2085e4776a4ba25
tree5f8ff9b816534dd1d553f0b6e12c0e80f28a9972
parentf47c02c0c8403963fbb8c3484e285727305d0f73
perf: Clean up sync_child_event()

sync_child_event() has outgrown its purpose, it does far too much.
Bring it back to its named purpose.

Rename __perf_event_exit_task() to perf_event_exit_event() to better
reflect what it does and move the event->state assignment under the
ctx->lock, like state changes ought to be.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c