diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 8eaa9f02093e..8c753468e1ea 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -368,6 +368,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_dirty_limits); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_oom_check_panic); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_uninterruptible_tasks); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_uninterruptible_tasks_dn); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_fault_around_bytes); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_blk_reset); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_blk_mq_rw_recovery); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sd_update_bus_speed_mode); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index a1a7da81e113..efe0b0e9b974 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -367,6 +367,9 @@ DECLARE_HOOK(android_vh_do_swap_page_spf, TP_ARGS(allow_swap_spf)); /* macro versions of hooks are no longer required */ +DECLARE_HOOK(android_vh_tune_fault_around_bytes, + TP_PROTO(unsigned long *fault_around_bytes), + TP_ARGS(fault_around_bytes)); #endif /* _TRACE_HOOK_MM_H */ /* This part must be outside protection */ diff --git a/mm/memory.c b/mm/memory.c index 8d558d462832..3bcfce7c6b96 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4379,6 +4379,8 @@ static vm_fault_t do_read_fault(struct vm_fault *vmf) struct vm_area_struct *vma = vmf->vma; vm_fault_t ret = 0; + trace_android_vh_tune_fault_around_bytes(&fault_around_bytes); + /* * Let's call ->map_pages() first and use ->fault() as fallback * if page by the offset is not ready to be mapped (cold cache or