diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 5dcdb52ee06f..a705333dc1b3 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -340,3 +340,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_compaction_try_to_compact_pages_exit); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_direct_reclaim_enter); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_direct_reclaim_exit); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_may_oom_exit); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_vmscan_kswapd_done); diff --git a/include/trace/hooks/vmscan.h b/include/trace/hooks/vmscan.h index 625d30d75757..f9effdd2d03e 100644 --- a/include/trace/hooks/vmscan.h +++ b/include/trace/hooks/vmscan.h @@ -49,6 +49,10 @@ DECLARE_HOOK(android_vh_tune_swappiness, DECLARE_HOOK(android_vh_scan_abort_check_wmarks, TP_PROTO(bool *check_wmarks), TP_ARGS(check_wmarks)); +DECLARE_HOOK(android_vh_vmscan_kswapd_done, + TP_PROTO(int node_id, unsigned int highest_zoneidx, unsigned int alloc_order, + unsigned int reclaim_order), + TP_ARGS(node_id, highest_zoneidx, alloc_order, reclaim_order)); #endif /* _TRACE_HOOK_VMSCAN_H */ /* This part must be outside protection */ #include diff --git a/mm/vmscan.c b/mm/vmscan.c index d1b9313ef88f..de0a079c029f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -7788,6 +7788,8 @@ kswapd_try_sleep: alloc_order); reclaim_order = balance_pgdat(pgdat, alloc_order, highest_zoneidx); + trace_android_vh_vmscan_kswapd_done(pgdat->node_id, highest_zoneidx, + alloc_order, reclaim_order); if (reclaim_order < alloc_order) goto kswapd_try_sleep; }