diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-11-20 16:19:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-21 08:11:39 -0500 |
commit | 58e5ad1de3d6ad931c84f0cc8ef0655c922f30ad (patch) | |
tree | f3b018f0f8ceaf21747b5e1d912ad30b40d00779 /kernel | |
parent | 3dbebf15c5d3e265f751eec72c1538a00da4be27 (diff) |
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 <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20091120212509.000272254@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/perf_event.c | 5 |
1 files 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) | |||
1526 | if (ctx->task && cpuctx->task_ctx != ctx) | 1526 | if (ctx->task && cpuctx->task_ctx != ctx) |
1527 | return; | 1527 | return; |
1528 | 1528 | ||
1529 | if (ctx->is_active) | 1529 | update_context_time(ctx); |
1530 | update_context_time(ctx); | ||
1531 | event->pmu->read(event); | ||
1532 | update_event_times(event); | 1530 | update_event_times(event); |
1531 | event->pmu->read(event); | ||
1533 | } | 1532 | } |
1534 | 1533 | ||
1535 | static u64 perf_event_read(struct perf_event *event) | 1534 | static u64 perf_event_read(struct perf_event *event) |