summaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 40f8b07c5601..087025fe3ba1 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1573,12 +1573,8 @@ static void rotate_ctx(struct perf_event_context *ctx)
raw_spin_lock(&ctx->lock);
/* Rotate the first entry last of non-pinned groups */
- perf_disable();
-
list_rotate_left(&ctx->flexible_groups);
- perf_enable();
-
raw_spin_unlock(&ctx->lock);
}
@@ -1593,6 +1589,8 @@ void perf_event_task_tick(struct task_struct *curr)
cpuctx = &__get_cpu_var(perf_cpu_context);
ctx = curr->perf_event_ctxp;
+ perf_disable();
+
perf_ctx_adjust_freq(&cpuctx->ctx);
if (ctx)
perf_ctx_adjust_freq(ctx);
@@ -1608,6 +1606,8 @@ void perf_event_task_tick(struct task_struct *curr)
cpu_ctx_sched_in(cpuctx, EVENT_FLEXIBLE);
if (ctx)
task_ctx_sched_in(curr, EVENT_FLEXIBLE);
+
+ perf_enable();
}
static int event_enable_on_exec(struct perf_event *event,
OpenPOWER on IntegriCloud