diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 02c26b461a52..c6614d410b4e 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -434,3 +434,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_compaction_begin); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_compaction_end); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_vmscan_kswapd_wake); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_vmscan_kswapd_done); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_customize_alloc_gfp); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index e227f824f2b9..411385435d80 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -381,6 +381,10 @@ DECLARE_HOOK(android_vh_save_track_hash, DECLARE_HOOK(android_vh_adjust_kvmalloc_flags, TP_PROTO(unsigned int order, gfp_t *alloc_flags), TP_ARGS(order, alloc_flags)); +DECLARE_HOOK(android_vh_customize_alloc_gfp, + TP_PROTO(gfp_t *alloc_gfp, unsigned int order), + TP_ARGS(alloc_gfp, order)); + #endif /* _TRACE_HOOK_MM_H */ /* This part must be outside protection */ diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1dcdd00e3089..29c4497c94aa 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5094,6 +5094,7 @@ struct page *__alloc_pages_noprof(gfp_t gfp, unsigned int order, * &cpuset_current_mems_allowed to optimize the fast-path attempt. */ ac.nodemask = nodemask; + trace_android_vh_customize_alloc_gfp(&alloc_gfp, order); page = __alloc_pages_slowpath(alloc_gfp, order, &ac);