aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r--include/linux/perf_counter.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 89698d8aba5c..e7213e46cf9c 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -669,7 +669,16 @@ static inline int is_software_counter(struct perf_counter *counter)
669 (counter->attr.type != PERF_TYPE_HW_CACHE); 669 (counter->attr.type != PERF_TYPE_HW_CACHE);
670} 670}
671 671
672extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); 672extern atomic_t perf_swcounter_enabled[PERF_COUNT_SW_MAX];
673
674extern void __perf_swcounter_event(u32, u64, int, struct pt_regs *, u64);
675
676static inline void
677perf_swcounter_event(u32 event, u64 nr, int nmi, struct pt_regs *regs, u64 addr)
678{
679 if (atomic_read(&perf_swcounter_enabled[event]))
680 __perf_swcounter_event(event, nr, nmi, regs, addr);
681}
673 682
674extern void __perf_counter_mmap(struct vm_area_struct *vma); 683extern void __perf_counter_mmap(struct vm_area_struct *vma);
675 684