summaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-09-05 13:24:28 +0200
committerIngo Molnar <mingo@kernel.org>2017-10-27 10:31:57 +0200
commit0ee098c97a6ebe163180e74b740c0a37bcdaa173 (patch)
treeccb8528331de304ecc3d7cd49793009814e73b65 /kernel/events
parentca0dd44cf37bfe316751e1701439c3ff44beb05c (diff)
downloadlinux-0ee098c97a6ebe163180e74b740c0a37bcdaa173.tar.bz2
perf/core: Update ctx time before detaching events
We should make sure the ctx time is updated before we detach events; which will want to update event times. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index d636f1d0e2ab..5fae98626b15 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -11129,6 +11129,7 @@ static void __perf_event_exit_context(void *__info)
struct perf_event *event;
raw_spin_lock(&ctx->lock);
+ ctx_sched_out(ctx, cpuctx, EVENT_TIME);
list_for_each_entry(event, &ctx->event_list, event_entry)
__perf_remove_from_context(event, cpuctx, ctx, (void *)DETACH_GROUP);
raw_spin_unlock(&ctx->lock);