Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58e5ad1d authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20091120212509.000272254@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3dbebf15
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -1526,10 +1526,9 @@ static void __perf_event_read(void *info)
	if (ctx->task && cpuctx->task_ctx != ctx)
	if (ctx->task && cpuctx->task_ctx != ctx)
		return;
		return;


	if (ctx->is_active)
	update_context_time(ctx);
	update_context_time(ctx);
	event->pmu->read(event);
	update_event_times(event);
	update_event_times(event);
	event->pmu->read(event);
}
}


static u64 perf_event_read(struct perf_event *event)
static u64 perf_event_read(struct perf_event *event)