aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 681af806d76b..63fbce1c80b5 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1366,6 +1366,8 @@ void perf_event_task_sched_in(struct task_struct *task)
1366 if (cpuctx->task_ctx == ctx) 1366 if (cpuctx->task_ctx == ctx)
1367 return; 1367 return;
1368 1368
1369 perf_disable();
1370
1369 /* 1371 /*
1370 * We want to keep the following priority order: 1372 * We want to keep the following priority order:
1371 * cpu pinned (that don't need to move), task pinned, 1373 * cpu pinned (that don't need to move), task pinned,
@@ -1378,6 +1380,8 @@ void perf_event_task_sched_in(struct task_struct *task)
1378 ctx_sched_in(ctx, cpuctx, EVENT_FLEXIBLE); 1380 ctx_sched_in(ctx, cpuctx, EVENT_FLEXIBLE);
1379 1381
1380 cpuctx->task_ctx = ctx; 1382 cpuctx->task_ctx = ctx;
1383
1384 perf_enable();
1381} 1385}
1382 1386
1383#define MAX_INTERRUPTS (~0ULL) 1387#define MAX_INTERRUPTS (~0ULL)