aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-11-20 16:19:51 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-21 08:11:38 -0500
commitf6f83785222b0ee037f7be90731f62a649292b5e (patch)
treefcafe2c4addc41ac2d65eb29c45ff2cee240efc3 /kernel/perf_event.c
parent02ffdbc866c8b1c8644601e9aa6155700eed4c91 (diff)
perf: Optimize __perf_event_read()
Both callers actually have IRQs disabled, no need doing so again. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20091120212508.863685796@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 65f4dab0ce60..e66f6c400d13 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1517,7 +1517,6 @@ static void __perf_event_read(void *info)
1517 struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context); 1517 struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context);
1518 struct perf_event *event = info; 1518 struct perf_event *event = info;
1519 struct perf_event_context *ctx = event->ctx; 1519 struct perf_event_context *ctx = event->ctx;
1520 unsigned long flags;
1521 1520
1522 /* 1521 /*
1523 * If this is a task context, we need to check whether it is 1522 * If this is a task context, we need to check whether it is
@@ -1529,12 +1528,10 @@ static void __perf_event_read(void *info)
1529 if (ctx->task && cpuctx->task_ctx != ctx) 1528 if (ctx->task && cpuctx->task_ctx != ctx)
1530 return; 1529 return;
1531 1530
1532 local_irq_save(flags);
1533 if (ctx->is_active) 1531 if (ctx->is_active)
1534 update_context_time(ctx); 1532 update_context_time(ctx);
1535 event->pmu->read(event); 1533 event->pmu->read(event);
1536 update_event_times(event); 1534 update_event_times(event);
1537 local_irq_restore(flags);
1538} 1535}
1539 1536
1540static u64 perf_event_read(struct perf_event *event) 1537static u64 perf_event_read(struct perf_event *event)