perf: Optimize __perf_event_read()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 20 Nov 2009 21:19:51 +0000 (22:19 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 21 Nov 2009 13:11:38 +0000 (14:11 +0100)
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>
kernel/perf_event.c

index 65f4dab0ce6074f88899f631c9dec166bab613a8..e66f6c400d131c5d2fe72b56f5f501467a988a96 100644 (file)
@@ -1517,7 +1517,6 @@ static void __perf_event_read(void *info)
        struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context);
        struct perf_event *event = info;
        struct perf_event_context *ctx = event->ctx;
-       unsigned long flags;
 
        /*
         * If this is a task context, we need to check whether it is
@@ -1529,12 +1528,10 @@ static void __perf_event_read(void *info)
        if (ctx->task && cpuctx->task_ctx != ctx)
                return;
 
-       local_irq_save(flags);
        if (ctx->is_active)
                update_context_time(ctx);
        event->pmu->read(event);
        update_event_times(event);
-       local_irq_restore(flags);
 }
 
 static u64 perf_event_read(struct perf_event *event)