aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-05-21 08:43:08 -0400
committerIngo Molnar <mingo@elte.hu>2010-06-09 05:12:37 -0400
commite78505958cf123048fb48cb56b79cebb8edd15fb (patch)
tree3688d124cdc906cbe9f6587c8671ba0a14c95262 /include/linux/perf_event.h
parenta6e6dea68c18f705957573ee5596097c7e82d0e5 (diff)
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 f34dab9b275e..7342979f95f2 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -487,6 +487,7 @@ struct perf_guest_info_callbacks {
487#include <linux/cpu.h> 487#include <linux/cpu.h>
488#include <asm/atomic.h> 488#include <asm/atomic.h>
489#include <asm/local.h> 489#include <asm/local.h>
490#include <asm/local64.h>
490 491
491#define PERF_MAX_STACK_DEPTH 255 492#define PERF_MAX_STACK_DEPTH 255
492 493
@@ -536,10 +537,10 @@ struct hw_perf_event {
536 struct arch_hw_breakpoint info; 537 struct arch_hw_breakpoint info;
537#endif 538#endif
538 }; 539 };
539 atomic64_t prev_count; 540 local64_t prev_count;
540 u64 sample_period; 541 u64 sample_period;
541 u64 last_period; 542 u64 last_period;
542 atomic64_t period_left; 543 local64_t period_left;
543 u64 interrupts; 544 u64 interrupts;
544 545
545 u64 freq_time_stamp; 546 u64 freq_time_stamp;
@@ -670,7 +671,7 @@ struct perf_event {
670 671
671 enum perf_event_active_state state; 672 enum perf_event_active_state state;
672 unsigned int attach_state; 673 unsigned int attach_state;
673 atomic64_t count; 674 local64_t count;
674 atomic64_t child_count; 675 atomic64_t child_count;
675 676
676 /* 677 /*