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

Commit 768a06e2 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

perf: Simplify task_clock_event_read()



There is no point in us having different code paths for nmi and !nmi
here, so remove the !nmi one.

Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3f7cce3c
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -5810,16 +5810,9 @@ static void task_clock_event_del(struct perf_event *event, int flags)

static void task_clock_event_read(struct perf_event *event)
{
	u64 time;

	if (!in_nmi()) {
		update_context_time(event->ctx);
		time = event->ctx->time;
	} else {
	u64 now = perf_clock();
	u64 delta = now - event->ctx->timestamp;
		time = event->ctx->time + delta;
	}
	u64 time = event->ctx->time + delta;

	task_clock_event_update(event, time);
}