diff options
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 8d54e6d25eeb..cead64ea6c15 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -18,6 +18,10 @@ | |||
18 | #include <linux/ioctl.h> | 18 | #include <linux/ioctl.h> |
19 | #include <asm/byteorder.h> | 19 | #include <asm/byteorder.h> |
20 | 20 | ||
21 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
22 | #include <asm/hw_breakpoint.h> | ||
23 | #endif | ||
24 | |||
21 | /* | 25 | /* |
22 | * User-space ABI bits: | 26 | * User-space ABI bits: |
23 | */ | 27 | */ |
@@ -31,6 +35,7 @@ enum perf_type_id { | |||
31 | PERF_TYPE_TRACEPOINT = 2, | 35 | PERF_TYPE_TRACEPOINT = 2, |
32 | PERF_TYPE_HW_CACHE = 3, | 36 | PERF_TYPE_HW_CACHE = 3, |
33 | PERF_TYPE_RAW = 4, | 37 | PERF_TYPE_RAW = 4, |
38 | PERF_TYPE_BREAKPOINT = 5, | ||
34 | 39 | ||
35 | PERF_TYPE_MAX, /* non-ABI */ | 40 | PERF_TYPE_MAX, /* non-ABI */ |
36 | }; | 41 | }; |
@@ -207,6 +212,15 @@ struct perf_event_attr { | |||
207 | __u32 wakeup_events; /* wakeup every n events */ | 212 | __u32 wakeup_events; /* wakeup every n events */ |
208 | __u32 wakeup_watermark; /* bytes before wakeup */ | 213 | __u32 wakeup_watermark; /* bytes before wakeup */ |
209 | }; | 214 | }; |
215 | |||
216 | union { | ||
217 | struct { /* Hardware breakpoint info */ | ||
218 | __u64 bp_addr; | ||
219 | __u32 bp_type; | ||
220 | __u32 bp_len; | ||
221 | }; | ||
222 | }; | ||
223 | |||
210 | __u32 __reserved_2; | 224 | __u32 __reserved_2; |
211 | 225 | ||
212 | __u64 __reserved_3; | 226 | __u64 __reserved_3; |
@@ -476,6 +490,11 @@ struct hw_perf_event { | |||
476 | atomic64_t count; | 490 | atomic64_t count; |
477 | struct hrtimer hrtimer; | 491 | struct hrtimer hrtimer; |
478 | }; | 492 | }; |
493 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
494 | union { /* breakpoint */ | ||
495 | struct arch_hw_breakpoint info; | ||
496 | }; | ||
497 | #endif | ||
479 | }; | 498 | }; |
480 | atomic64_t prev_count; | 499 | atomic64_t prev_count; |
481 | u64 sample_period; | 500 | u64 sample_period; |
@@ -588,7 +607,7 @@ struct perf_event { | |||
588 | u64 tstamp_running; | 607 | u64 tstamp_running; |
589 | u64 tstamp_stopped; | 608 | u64 tstamp_stopped; |
590 | 609 | ||
591 | struct perf_event_attr attr; | 610 | struct perf_event_attr attr; |
592 | struct hw_perf_event hw; | 611 | struct hw_perf_event hw; |
593 | 612 | ||
594 | struct perf_event_context *ctx; | 613 | struct perf_event_context *ctx; |
@@ -643,6 +662,8 @@ struct perf_event { | |||
643 | 662 | ||
644 | perf_callback_t callback; | 663 | perf_callback_t callback; |
645 | 664 | ||
665 | perf_callback_t event_callback; | ||
666 | |||
646 | #endif /* CONFIG_PERF_EVENTS */ | 667 | #endif /* CONFIG_PERF_EVENTS */ |
647 | }; | 668 | }; |
648 | 669 | ||
@@ -831,6 +852,7 @@ extern int sysctl_perf_event_sample_rate; | |||
831 | extern void perf_event_init(void); | 852 | extern void perf_event_init(void); |
832 | extern void perf_tp_event(int event_id, u64 addr, u64 count, | 853 | extern void perf_tp_event(int event_id, u64 addr, u64 count, |
833 | void *record, int entry_size); | 854 | void *record, int entry_size); |
855 | extern void perf_bp_event(struct perf_event *event, void *data); | ||
834 | 856 | ||
835 | #ifndef perf_misc_flags | 857 | #ifndef perf_misc_flags |
836 | #define perf_misc_flags(regs) (user_mode(regs) ? PERF_RECORD_MISC_USER : \ | 858 | #define perf_misc_flags(regs) (user_mode(regs) ? PERF_RECORD_MISC_USER : \ |
@@ -865,6 +887,8 @@ static inline int perf_event_task_enable(void) { return -EINVAL; } | |||
865 | static inline void | 887 | static inline void |
866 | perf_sw_event(u32 event_id, u64 nr, int nmi, | 888 | perf_sw_event(u32 event_id, u64 nr, int nmi, |
867 | struct pt_regs *regs, u64 addr) { } | 889 | struct pt_regs *regs, u64 addr) { } |
890 | static inline void | ||
891 | perf_bp_event(struct perf_event *event, void *data) { } | ||
868 | 892 | ||
869 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 893 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
870 | static inline void perf_event_comm(struct task_struct *tsk) { } | 894 | static inline void perf_event_comm(struct task_struct *tsk) { } |