perf: Optimize perf_output_*() by avoiding local_xchg()

Since the x86 XCHG ins implies LOCK, avoid the use by
using a sequence count instead.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Peter Zijlstra
2010-05-18 11:12:48 +02:00
committed by Ingo Molnar
parent fa5881514e
commit 6d1acfd5c6
2 changed files with 3 additions and 1 deletions

View File

@@ -804,6 +804,7 @@ struct perf_output_handle {
struct perf_mmap_data *data;
unsigned long head;
unsigned long offset;
unsigned long wakeup;
int nmi;
int sample;
};