diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index b013d648356b..e340569dd60b 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -412,6 +412,7 @@ 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_waiting_for_page_migration); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_migrate_page_states); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_page_referenced_one_end); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_count_pswpin); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_count_pswpout); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_count_swpout_vm_event); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 2b75c4e46f6a..66953b1a950f 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -164,6 +164,9 @@ DECLARE_HOOK(android_vh_waiting_for_page_migration, DECLARE_HOOK(android_vh_migrate_page_states, TP_PROTO(struct page *page, struct page *newpage), TP_ARGS(page, newpage)); +DECLARE_HOOK(android_vh_page_referenced_one_end, + TP_PROTO(struct vm_area_struct *vma, struct page *page, int referenced), + TP_ARGS(vma, page, referenced)); DECLARE_HOOK(android_vh_count_pswpin, TP_PROTO(struct swap_info_struct *sis), TP_ARGS(sis)); diff --git a/mm/rmap.c b/mm/rmap.c index 22464daf02d6..1a0a75d8b4ce 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -819,6 +819,7 @@ static bool page_referenced_one(struct page *page, struct vm_area_struct *vma, pra->vm_flags |= vma->vm_flags; } + trace_android_vh_page_referenced_one_end(vma, page, referenced); if (!pra->mapcount) return false; /* To break the loop */