projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4f4bb6
)
perf: Only update context time when active
author
Peter Zijlstra
<
[email protected]
>
Wed, 24 Feb 2016 17:45:43 +0000
(18:45 +0100)
committer
Ingo Molnar
<
[email protected]
>
Thu, 25 Feb 2016 07:42:33 +0000
(08:42 +0100)
Signed-off-by: Peter Zijlstra (Intel) <
[email protected]
>
Cc: Alexander Shishkin <
[email protected]
>
Cc: Arnaldo Carvalho de Melo <
[email protected]
>
Cc: Jiri Olsa <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
kernel/events/core.c
patch
|
blob
|
history
diff --git
a/kernel/events/core.c
b/kernel/events/core.c
index d5299e2e435d1592e9be2f965a9f69946c775ef3..64698fbfad9f8bd4feac74da2b1653f1f73f6fce 100644
(file)
--- a/
kernel/events/core.c
+++ b/
kernel/events/core.c
@@
-2170,12
+2170,12
@@
perf_install_in_context(struct perf_event_context *ctx,
raw_spin_unlock_irq(&ctx->lock);
return;
}
- 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);
+
+ if (ctx->is_active) {
+ update_context_time(ctx);
+ update_cgrp_time_from_event(event);
+ }
+
add_event_to_ctx(event, ctx);
raw_spin_unlock_irq(&ctx->lock);