diff options
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 7b18b4fd5df7..6f8cd7da1a01 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -487,9 +487,8 @@ struct hw_perf_event { | |||
487 | struct hrtimer hrtimer; | 487 | struct hrtimer hrtimer; |
488 | }; | 488 | }; |
489 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 489 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
490 | union { /* breakpoint */ | 490 | /* breakpoint */ |
491 | struct arch_hw_breakpoint info; | 491 | struct arch_hw_breakpoint info; |
492 | }; | ||
493 | #endif | 492 | #endif |
494 | }; | 493 | }; |
495 | atomic64_t prev_count; | 494 | atomic64_t prev_count; |
@@ -802,6 +801,13 @@ struct perf_sample_data { | |||
802 | struct perf_raw_record *raw; | 801 | struct perf_raw_record *raw; |
803 | }; | 802 | }; |
804 | 803 | ||
804 | static inline | ||
805 | void perf_sample_data_init(struct perf_sample_data *data, u64 addr) | ||
806 | { | ||
807 | data->addr = addr; | ||
808 | data->raw = NULL; | ||
809 | } | ||
810 | |||
805 | extern void perf_output_sample(struct perf_output_handle *handle, | 811 | extern void perf_output_sample(struct perf_output_handle *handle, |
806 | struct perf_event_header *header, | 812 | struct perf_event_header *header, |
807 | struct perf_sample_data *data, | 813 | struct perf_sample_data *data, |
@@ -858,6 +864,21 @@ extern int sysctl_perf_event_paranoid; | |||
858 | extern int sysctl_perf_event_mlock; | 864 | extern int sysctl_perf_event_mlock; |
859 | extern int sysctl_perf_event_sample_rate; | 865 | extern int sysctl_perf_event_sample_rate; |
860 | 866 | ||
867 | static inline bool perf_paranoid_tracepoint_raw(void) | ||
868 | { | ||
869 | return sysctl_perf_event_paranoid > -1; | ||
870 | } | ||
871 | |||
872 | static inline bool perf_paranoid_cpu(void) | ||
873 | { | ||
874 | return sysctl_perf_event_paranoid > 0; | ||
875 | } | ||
876 | |||
877 | static inline bool perf_paranoid_kernel(void) | ||
878 | { | ||
879 | return sysctl_perf_event_paranoid > 1; | ||
880 | } | ||
881 | |||
861 | extern void perf_event_init(void); | 882 | extern void perf_event_init(void); |
862 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); | 883 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); |
863 | extern void perf_bp_event(struct perf_event *event, void *data); | 884 | extern void perf_bp_event(struct perf_event *event, void *data); |