diff options
Diffstat (limited to 'include/linux/perf_event.h')
| -rw-r--r-- | include/linux/perf_event.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 3356abcfff18..707617a8c0f6 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -167,16 +167,27 @@ struct perf_event; | |||
| 167 | #define PERF_EVENT_TXN 0x1 | 167 | #define PERF_EVENT_TXN 0x1 |
| 168 | 168 | ||
| 169 | /** | 169 | /** |
| 170 | * pmu::capabilities flags | ||
| 171 | */ | ||
| 172 | #define PERF_PMU_CAP_NO_INTERRUPT 0x01 | ||
| 173 | |||
| 174 | /** | ||
| 170 | * struct pmu - generic performance monitoring unit | 175 | * struct pmu - generic performance monitoring unit |
| 171 | */ | 176 | */ |
| 172 | struct pmu { | 177 | struct pmu { |
| 173 | struct list_head entry; | 178 | struct list_head entry; |
| 174 | 179 | ||
| 180 | struct module *module; | ||
| 175 | struct device *dev; | 181 | struct device *dev; |
| 176 | const struct attribute_group **attr_groups; | 182 | const struct attribute_group **attr_groups; |
| 177 | const char *name; | 183 | const char *name; |
| 178 | int type; | 184 | int type; |
| 179 | 185 | ||
| 186 | /* | ||
| 187 | * various common per-pmu feature flags | ||
| 188 | */ | ||
| 189 | int capabilities; | ||
| 190 | |||
| 180 | int * __percpu pmu_disable_count; | 191 | int * __percpu pmu_disable_count; |
| 181 | struct perf_cpu_context * __percpu pmu_cpu_context; | 192 | struct perf_cpu_context * __percpu pmu_cpu_context; |
| 182 | int task_ctx_nr; | 193 | int task_ctx_nr; |
| @@ -402,6 +413,8 @@ struct perf_event { | |||
| 402 | 413 | ||
| 403 | struct ring_buffer *rb; | 414 | struct ring_buffer *rb; |
| 404 | struct list_head rb_entry; | 415 | struct list_head rb_entry; |
| 416 | unsigned long rcu_batches; | ||
| 417 | int rcu_pending; | ||
| 405 | 418 | ||
| 406 | /* poll related */ | 419 | /* poll related */ |
| 407 | wait_queue_head_t waitq; | 420 | wait_queue_head_t waitq; |
| @@ -693,7 +706,8 @@ extern struct perf_guest_info_callbacks *perf_guest_cbs; | |||
| 693 | extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | 706 | extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); |
| 694 | extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | 707 | extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); |
| 695 | 708 | ||
| 696 | extern void perf_event_comm(struct task_struct *tsk); | 709 | extern void perf_event_exec(void); |
| 710 | extern void perf_event_comm(struct task_struct *tsk, bool exec); | ||
| 697 | extern void perf_event_fork(struct task_struct *tsk); | 711 | extern void perf_event_fork(struct task_struct *tsk); |
| 698 | 712 | ||
| 699 | /* Callchains */ | 713 | /* Callchains */ |
| @@ -770,7 +784,7 @@ extern void perf_event_enable(struct perf_event *event); | |||
| 770 | extern void perf_event_disable(struct perf_event *event); | 784 | extern void perf_event_disable(struct perf_event *event); |
| 771 | extern int __perf_event_disable(void *info); | 785 | extern int __perf_event_disable(void *info); |
| 772 | extern void perf_event_task_tick(void); | 786 | extern void perf_event_task_tick(void); |
| 773 | #else | 787 | #else /* !CONFIG_PERF_EVENTS: */ |
| 774 | static inline void | 788 | static inline void |
| 775 | perf_event_task_sched_in(struct task_struct *prev, | 789 | perf_event_task_sched_in(struct task_struct *prev, |
| 776 | struct task_struct *task) { } | 790 | struct task_struct *task) { } |
| @@ -800,7 +814,8 @@ static inline int perf_unregister_guest_info_callbacks | |||
| 800 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | 814 | (struct perf_guest_info_callbacks *callbacks) { return 0; } |
| 801 | 815 | ||
| 802 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 816 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
| 803 | static inline void perf_event_comm(struct task_struct *tsk) { } | 817 | static inline void perf_event_exec(void) { } |
| 818 | static inline void perf_event_comm(struct task_struct *tsk, bool exec) { } | ||
| 804 | static inline void perf_event_fork(struct task_struct *tsk) { } | 819 | static inline void perf_event_fork(struct task_struct *tsk) { } |
| 805 | static inline void perf_event_init(void) { } | 820 | static inline void perf_event_init(void) { } |
| 806 | static inline int perf_swevent_get_recursion_context(void) { return -1; } | 821 | static inline int perf_swevent_get_recursion_context(void) { return -1; } |
