|
@@ -272,6 +272,11 @@ struct pmu {
|
|
|
*/
|
|
|
size_t task_ctx_size;
|
|
|
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Return the count value for a counter.
|
|
|
+ */
|
|
|
+ u64 (*count) (struct perf_event *event); /*optional*/
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -770,6 +775,11 @@ static inline void perf_event_task_sched_out(struct task_struct *prev,
|
|
|
__perf_event_task_sched_out(prev, next);
|
|
|
}
|
|
|
|
|
|
+static inline u64 __perf_event_count(struct perf_event *event)
|
|
|
+{
|
|
|
+ return local64_read(&event->count) + atomic64_read(&event->child_count);
|
|
|
+}
|
|
|
+
|
|
|
extern void perf_event_mmap(struct vm_area_struct *vma);
|
|
|
extern struct perf_guest_info_callbacks *perf_guest_cbs;
|
|
|
extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
|