Commit 6f932e5b authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

perf: Only update context time when active

Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dvyukov@google.com
Cc: eranian@google.com
Cc: oleg@redhat.com
Cc: panand@redhat.com
Cc: sasha.levin@oracle.com
Cc: vince@deater.net
Link: http://lkml.kernel.org/r/20160224174947.860690919@infradead.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent a4f4bb6d
......@@ -2170,12 +2170,12 @@ perf_install_in_context(struct perf_event_context *ctx,
raw_spin_unlock_irq(&ctx->lock);
return;
}
if (ctx->is_active) {
update_context_time(ctx);
/*
* Update cgrp time only if current cgrp matches event->cgrp.
* Must be done before calling add_event_to_ctx().
*/
update_cgrp_time_from_event(event);
}
add_event_to_ctx(event, ctx);
raw_spin_unlock_irq(&ctx->lock);
......
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