diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 4d120996dbc7..77dd1eb1b1f3 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -463,6 +463,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_handle_trylock_failed_folio); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_hibernate_state); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_page_should_be_protected); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_page_referenced_check_bypass); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_count_workingset_refault); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_swapmem_gather_init); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_swapmem_gather_add_bypass); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_swapmem_gather_finish); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 5696142eb51a..fdbdd8080370 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -270,6 +270,9 @@ DECLARE_HOOK(android_vh_page_should_be_protected, s8 priority, u64 *ext, int *should_protect), TP_ARGS(folio, nr_scanned, priority, ext, should_protect)); +DECLARE_HOOK(android_vh_count_workingset_refault, + TP_PROTO(struct folio *folio), + TP_ARGS(folio)); DECLARE_HOOK(android_vh_swapmem_gather_init, TP_PROTO(struct mm_struct *mm), TP_ARGS(mm)); diff --git a/mm/workingset.c b/mm/workingset.c index 4379f109f204..333640fc7deb 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -16,6 +16,7 @@ #include #include #include +#include /* * Double CLOCK lists @@ -401,6 +402,8 @@ void workingset_refault(struct folio *folio, void *shadow) int memcgid; long nr; + trace_android_vh_count_workingset_refault(folio); + if (lru_gen_enabled()) { lru_gen_refault(folio, shadow); return;