mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
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>
This commit is contained in:
parent
02ffdbc866
commit
f6f8378522
1 changed files with 0 additions and 3 deletions
|
@ -1517,7 +1517,6 @@ static void __perf_event_read(void *info)
|
||||||
struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context);
|
struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context);
|
||||||
struct perf_event *event = info;
|
struct perf_event *event = info;
|
||||||
struct perf_event_context *ctx = event->ctx;
|
struct perf_event_context *ctx = event->ctx;
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this is a task context, we need to check whether it is
|
* 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)
|
if (ctx->task && cpuctx->task_ctx != ctx)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
local_irq_save(flags);
|
|
||||||
if (ctx->is_active)
|
if (ctx->is_active)
|
||||||
update_context_time(ctx);
|
update_context_time(ctx);
|
||||||
event->pmu->read(event);
|
event->pmu->read(event);
|
||||||
update_event_times(event);
|
update_event_times(event);
|
||||||
local_irq_restore(flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u64 perf_event_read(struct perf_event *event)
|
static u64 perf_event_read(struct perf_event *event)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue