diff options
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 07b7a435bf03..9dbe8cdaf145 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -2798,6 +2798,27 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski | |||
2798 | 2798 | ||
2799 | 2799 | ||
2800 | /* | 2800 | /* |
2801 | * We assume there is only KVM supporting the callbacks. | ||
2802 | * Later on, we might change it to a list if there is | ||
2803 | * another virtualization implementation supporting the callbacks. | ||
2804 | */ | ||
2805 | struct perf_guest_info_callbacks *perf_guest_cbs; | ||
2806 | |||
2807 | int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) | ||
2808 | { | ||
2809 | perf_guest_cbs = cbs; | ||
2810 | return 0; | ||
2811 | } | ||
2812 | EXPORT_SYMBOL_GPL(perf_register_guest_info_callbacks); | ||
2813 | |||
2814 | int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs) | ||
2815 | { | ||
2816 | perf_guest_cbs = NULL; | ||
2817 | return 0; | ||
2818 | } | ||
2819 | EXPORT_SYMBOL_GPL(perf_unregister_guest_info_callbacks); | ||
2820 | |||
2821 | /* | ||
2801 | * Output | 2822 | * Output |
2802 | */ | 2823 | */ |
2803 | static bool perf_output_space(struct perf_mmap_data *data, unsigned long tail, | 2824 | static bool perf_output_space(struct perf_mmap_data *data, unsigned long tail, |
@@ -3749,7 +3770,7 @@ void __perf_event_mmap(struct vm_area_struct *vma) | |||
3749 | .event_id = { | 3770 | .event_id = { |
3750 | .header = { | 3771 | .header = { |
3751 | .type = PERF_RECORD_MMAP, | 3772 | .type = PERF_RECORD_MMAP, |
3752 | .misc = 0, | 3773 | .misc = PERF_RECORD_MISC_USER, |
3753 | /* .size */ | 3774 | /* .size */ |
3754 | }, | 3775 | }, |
3755 | /* .pid */ | 3776 | /* .pid */ |