diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-02-22 16:52:24 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-02-23 11:35:47 +0100 |
commit | 768a06e2ca49cdf72389208cfc056a36cf8bc5e3 (patch) | |
tree | cd3e40f7d83526747785e7d4954ce96a5a3d69c7 | |
parent | 3f7cce3c18188a067d463749168bdda5abc5b0f7 (diff) | |
download | linux-768a06e2ca49cdf72389208cfc056a36cf8bc5e3.tar.gz linux-768a06e2ca49cdf72389208cfc056a36cf8bc5e3.tar.bz2 linux-768a06e2ca49cdf72389208cfc056a36cf8bc5e3.zip |
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: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/perf_event.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index dadeaea4b3fc..64a018e94fca 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -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 now = perf_clock(); + u64 delta = now - event->ctx->timestamp; + u64 time = event->ctx->time + delta; task_clock_event_update(event, time); } |