perf: Add cpu isolation awareness
Ensure perf events does not wake up idle cores when core is isolated.
Change-Id: Ifefb2f1cf6c24af7bc46fc62797955b8c8ad5815
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
diff --git a/kernel/events/core.c b/kernel/events/core.c
index ede107c..9048830 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -3586,7 +3586,8 @@
* If event is enabled and currently active on a CPU, update the
* value in the event structure:
*/
- if (event->state == PERF_EVENT_STATE_ACTIVE) {
+ if (event->state == PERF_EVENT_STATE_ACTIVE &&
+ !cpu_isolated(event->oncpu)) {
struct perf_read_data data = {
.event = event,
.group = group,