aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/perf_counter.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 8ac18852dcfe..037a81145aca 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -137,9 +137,11 @@ struct perf_counter_hw_event {
137 exclude_kernel : 1, /* ditto kernel */ 137 exclude_kernel : 1, /* ditto kernel */
138 exclude_hv : 1, /* ditto hypervisor */ 138 exclude_hv : 1, /* ditto hypervisor */
139 exclude_idle : 1, /* don't count when idle */ 139 exclude_idle : 1, /* don't count when idle */
140 include_tid : 1, /* include the tid */ 140 include_tid : 1, /* include the tid */
141 mmap : 1, /* include mmap data */
142 munmap : 1, /* include munmap data */
141 143
142 __reserved_1 : 54; 144 __reserved_1 : 52;
143 145
144 __u32 extra_config_len; 146 __u32 extra_config_len;
145 __u32 __reserved_4; 147 __u32 __reserved_4;
@@ -211,6 +213,9 @@ enum perf_event_type {
211 PERF_EVENT_IP = 0, 213 PERF_EVENT_IP = 0,
212 PERF_EVENT_GROUP = 1, 214 PERF_EVENT_GROUP = 1,
213 215
216 PERF_EVENT_MMAP = 2,
217 PERF_EVENT_MUNMAP = 3,
218
214 __PERF_EVENT_TID = 0x100, 219 __PERF_EVENT_TID = 0x100,
215}; 220};
216 221
@@ -491,6 +496,12 @@ static inline int is_software_counter(struct perf_counter *counter)
491 496
492extern void perf_swcounter_event(u32, u64, int, struct pt_regs *); 497extern void perf_swcounter_event(u32, u64, int, struct pt_regs *);
493 498
499extern void perf_counter_mmap(unsigned long addr, unsigned long len,
500 unsigned long pgoff, struct file *file);
501
502extern void perf_counter_munmap(unsigned long addr, unsigned long len,
503 unsigned long pgoff, struct file *file);
504
494#else 505#else
495static inline void 506static inline void
496perf_counter_task_sched_in(struct task_struct *task, int cpu) { } 507perf_counter_task_sched_in(struct task_struct *task, int cpu) { }
@@ -511,6 +522,15 @@ static inline int perf_counter_task_enable(void) { return -EINVAL; }
511static inline void 522static inline void
512perf_swcounter_event(u32 event, u64 nr, int nmi, struct pt_regs *regs) { } 523perf_swcounter_event(u32 event, u64 nr, int nmi, struct pt_regs *regs) { }
513 524
525
526static inline void
527perf_counter_mmap(unsigned long addr, unsigned long len,
528 unsigned long pgoff, struct file *file) { }
529
530static inline void
531perf_counter_munmap(unsigned long addr, unsigned long len,
532 unsigned long pgoff, struct file *file) { }
533
514#endif 534#endif
515 535
516#endif /* __KERNEL__ */ 536#endif /* __KERNEL__ */