aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h21
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 */
172struct pmu { 177struct 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;
693extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); 706extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
694extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); 707extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
695 708
696extern void perf_event_comm(struct task_struct *tsk); 709extern void perf_event_exec(void);
710extern void perf_event_comm(struct task_struct *tsk, bool exec);
697extern void perf_event_fork(struct task_struct *tsk); 711extern 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);
770extern void perf_event_disable(struct perf_event *event); 784extern void perf_event_disable(struct perf_event *event);
771extern int __perf_event_disable(void *info); 785extern int __perf_event_disable(void *info);
772extern void perf_event_task_tick(void); 786extern void perf_event_task_tick(void);
773#else 787#else /* !CONFIG_PERF_EVENTS: */
774static inline void 788static inline void
775perf_event_task_sched_in(struct task_struct *prev, 789perf_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
802static inline void perf_event_mmap(struct vm_area_struct *vma) { } 816static inline void perf_event_mmap(struct vm_area_struct *vma) { }
803static inline void perf_event_comm(struct task_struct *tsk) { } 817static inline void perf_event_exec(void) { }
818static inline void perf_event_comm(struct task_struct *tsk, bool exec) { }
804static inline void perf_event_fork(struct task_struct *tsk) { } 819static inline void perf_event_fork(struct task_struct *tsk) { }
805static inline void perf_event_init(void) { } 820static inline void perf_event_init(void) { }
806static inline int perf_swevent_get_recursion_context(void) { return -1; } 821static inline int perf_swevent_get_recursion_context(void) { return -1; }