From 58e5ad1de3d6ad931c84f0cc8ef0655c922f30ad Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 20 Nov 2009 22:19:53 +0100 Subject: [PATCH] perf: Simplify __perf_event_read cpuctx is always active, task context is always active for current the previous condition verifies that if its a task context its for current, hence we can assume ctx->is_active. Signed-off-by: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <20091120212509.000272254@chello.nl> Signed-off-by: Ingo Molnar --- kernel/perf_event.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/perf_event.c b/kernel/perf_event.c index af150bbcfc5b..028619dd6d0e 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -1526,10 +1526,9 @@ static void __perf_event_read(void *info) if (ctx->task && cpuctx->task_ctx != ctx) return; - if (ctx->is_active) - update_context_time(ctx); - event->pmu->read(event); + update_context_time(ctx); update_event_times(event); + event->pmu->read(event); } static u64 perf_event_read(struct perf_event *event) -- 2.30.2