diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 956e8594bf3d..c0855cc0692e 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -407,6 +407,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_handle_tlb_conf); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_node_memcgs); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ra_tuning_max_page); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_memcg_scan_type); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_handle_pte_fault_end); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cow_user_page); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_swapin_add_anon_rmap); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_page_isolated_for_reclaim); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 6b4d778ad2de..3d4bcd79cd34 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -149,6 +149,9 @@ DECLARE_HOOK(android_vh_subpage_dma_contig_alloc, DECLARE_HOOK(android_vh_ra_tuning_max_page, TP_PROTO(struct readahead_control *ractl, unsigned long *max_page), TP_ARGS(ractl, max_page)); +DECLARE_HOOK(android_vh_handle_pte_fault_end, + TP_PROTO(struct vm_fault *vmf, unsigned long highest_memmap_pfn), + TP_ARGS(vmf, highest_memmap_pfn)); DECLARE_HOOK(android_vh_cow_user_page, TP_PROTO(struct vm_fault *vmf, struct page *page), TP_ARGS(vmf, page)); diff --git a/mm/memory.c b/mm/memory.c index 6ba58a781626..7d70acf494d4 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4763,6 +4763,7 @@ static vm_fault_t handle_pte_fault(struct vm_fault *vmf) if (vmf->flags & FAULT_FLAG_WRITE) flush_tlb_fix_spurious_fault(vmf->vma, vmf->address); } + trace_android_vh_handle_pte_fault_end(vmf, highest_memmap_pfn); unlock: pte_unmap_unlock(vmf->pte, vmf->ptl); return ret;