diff options
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r-- | include/linux/perf_counter.h | 11 |
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 | ||
672 | extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | 672 | extern atomic_t perf_swcounter_enabled[PERF_COUNT_SW_MAX]; |
673 | |||
674 | extern void __perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | ||
675 | |||
676 | static inline void | ||
677 | perf_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 | ||
674 | extern void __perf_counter_mmap(struct vm_area_struct *vma); | 683 | extern void __perf_counter_mmap(struct vm_area_struct *vma); |
675 | 684 | ||