summaryrefslogtreecommitdiff
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-05-21 14:43:08 +0200
committerIngo Molnar <mingo@elte.hu>2010-06-09 11:12:37 +0200
commite78505958cf123048fb48cb56b79cebb8edd15fb (patch)
tree3688d124cdc906cbe9f6587c8671ba0a14c95262 /include/linux/perf_event.h
parenta6e6dea68c18f705957573ee5596097c7e82d0e5 (diff)
downloadlinux-3.10-e78505958cf123048fb48cb56b79cebb8edd15fb.tar.gz
linux-3.10-e78505958cf123048fb48cb56b79cebb8edd15fb.tar.bz2
linux-3.10-e78505958cf123048fb48cb56b79cebb8edd15fb.zip
perf: Convert perf_event to local_t
Since now all modification to event->count (and ->prev_count and ->period_left) are local to a cpu, change then to local64_t so we avoid the LOCK'ed ops. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index f34dab9b275..7342979f95f 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -487,6 +487,7 @@ struct perf_guest_info_callbacks {
#include <linux/cpu.h>
#include <asm/atomic.h>
#include <asm/local.h>
+#include <asm/local64.h>
#define PERF_MAX_STACK_DEPTH 255
@@ -536,10 +537,10 @@ struct hw_perf_event {
struct arch_hw_breakpoint info;
#endif
};
- atomic64_t prev_count;
+ local64_t prev_count;
u64 sample_period;
u64 last_period;
- atomic64_t period_left;
+ local64_t period_left;
u64 interrupts;
u64 freq_time_stamp;
@@ -670,7 +671,7 @@ struct perf_event {
enum perf_event_active_state state;
unsigned int attach_state;
- atomic64_t count;
+ local64_t count;
atomic64_t child_count;
/*