diff options
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 6bfb2faa0b19..1d795df6f4cf 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -135,16 +135,21 @@ struct hw_perf_event { | |||
135 | struct { /* software */ | 135 | struct { /* software */ |
136 | struct hrtimer hrtimer; | 136 | struct hrtimer hrtimer; |
137 | }; | 137 | }; |
138 | struct { /* tracepoint */ | ||
139 | struct task_struct *tp_target; | ||
140 | /* for tp_event->class */ | ||
141 | struct list_head tp_list; | ||
142 | }; | ||
138 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 143 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
139 | struct { /* breakpoint */ | 144 | struct { /* breakpoint */ |
140 | struct arch_hw_breakpoint info; | ||
141 | struct list_head bp_list; | ||
142 | /* | 145 | /* |
143 | * Crufty hack to avoid the chicken and egg | 146 | * Crufty hack to avoid the chicken and egg |
144 | * problem hw_breakpoint has with context | 147 | * problem hw_breakpoint has with context |
145 | * creation and event initalization. | 148 | * creation and event initalization. |
146 | */ | 149 | */ |
147 | struct task_struct *bp_target; | 150 | struct task_struct *bp_target; |
151 | struct arch_hw_breakpoint info; | ||
152 | struct list_head bp_list; | ||
148 | }; | 153 | }; |
149 | #endif | 154 | #endif |
150 | }; | 155 | }; |
@@ -794,6 +799,12 @@ static inline int __perf_event_disable(void *info) { return -1; } | |||
794 | static inline void perf_event_task_tick(void) { } | 799 | static inline void perf_event_task_tick(void) { } |
795 | #endif | 800 | #endif |
796 | 801 | ||
802 | #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL) | ||
803 | extern void perf_restore_debug_store(void); | ||
804 | #else | ||
805 | static inline void perf_restore_debug_store(void) { } | ||
806 | #endif | ||
807 | |||
797 | #define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x)) | 808 | #define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x)) |
798 | 809 | ||
799 | /* | 810 | /* |
@@ -817,6 +828,17 @@ do { \ | |||
817 | } while (0) | 828 | } while (0) |
818 | 829 | ||
819 | 830 | ||
831 | struct perf_pmu_events_attr { | ||
832 | struct device_attribute attr; | ||
833 | u64 id; | ||
834 | }; | ||
835 | |||
836 | #define PMU_EVENT_ATTR(_name, _var, _id, _show) \ | ||
837 | static struct perf_pmu_events_attr _var = { \ | ||
838 | .attr = __ATTR(_name, 0444, _show, NULL), \ | ||
839 | .id = _id, \ | ||
840 | }; | ||
841 | |||
820 | #define PMU_FORMAT_ATTR(_name, _format) \ | 842 | #define PMU_FORMAT_ATTR(_name, _format) \ |
821 | static ssize_t \ | 843 | static ssize_t \ |
822 | _name##_show(struct device *dev, \ | 844 | _name##_show(struct device *dev, \ |