diff options
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index a9209118d80f..707617a8c0f6 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -167,6 +167,11 @@ 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 { |
@@ -178,6 +183,11 @@ struct pmu { | |||
178 | const char *name; | 183 | const char *name; |
179 | int type; | 184 | int type; |
180 | 185 | ||
186 | /* | ||
187 | * various common per-pmu feature flags | ||
188 | */ | ||
189 | int capabilities; | ||
190 | |||
181 | int * __percpu pmu_disable_count; | 191 | int * __percpu pmu_disable_count; |
182 | struct perf_cpu_context * __percpu pmu_cpu_context; | 192 | struct perf_cpu_context * __percpu pmu_cpu_context; |
183 | int task_ctx_nr; | 193 | int task_ctx_nr; |
@@ -696,7 +706,8 @@ extern struct perf_guest_info_callbacks *perf_guest_cbs; | |||
696 | 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); |
697 | 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); |
698 | 708 | ||
699 | 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); | ||
700 | extern void perf_event_fork(struct task_struct *tsk); | 711 | extern void perf_event_fork(struct task_struct *tsk); |
701 | 712 | ||
702 | /* Callchains */ | 713 | /* Callchains */ |
@@ -773,7 +784,7 @@ extern void perf_event_enable(struct perf_event *event); | |||
773 | extern void perf_event_disable(struct perf_event *event); | 784 | extern void perf_event_disable(struct perf_event *event); |
774 | extern int __perf_event_disable(void *info); | 785 | extern int __perf_event_disable(void *info); |
775 | extern void perf_event_task_tick(void); | 786 | extern void perf_event_task_tick(void); |
776 | #else | 787 | #else /* !CONFIG_PERF_EVENTS: */ |
777 | static inline void | 788 | static inline void |
778 | perf_event_task_sched_in(struct task_struct *prev, | 789 | perf_event_task_sched_in(struct task_struct *prev, |
779 | struct task_struct *task) { } | 790 | struct task_struct *task) { } |
@@ -803,7 +814,8 @@ static inline int perf_unregister_guest_info_callbacks | |||
803 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | 814 | (struct perf_guest_info_callbacks *callbacks) { return 0; } |
804 | 815 | ||
805 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 816 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
806 | 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) { } | ||
807 | static inline void perf_event_fork(struct task_struct *tsk) { } | 819 | static inline void perf_event_fork(struct task_struct *tsk) { } |
808 | static inline void perf_event_init(void) { } | 820 | static inline void perf_event_init(void) { } |
809 | static inline int perf_swevent_get_recursion_context(void) { return -1; } | 821 | static inline int perf_swevent_get_recursion_context(void) { return -1; } |