ANDROID: vendor_hooks: Add hook in try_to_unmap_one()

Add hook in try_to_unmap_one() to trace this function for debug memory
swap bugs.

Bug: 198385827
Change-Id: I1fdbe60e09bb491b949e06a07133710453ecca03
Signed-off-by: Jiewen Wang <jiewen.wang@vivo.com>
This commit is contained in:
Jiewen Wang
2021-09-06 16:55:03 +08:00
parent 878e0caa77
commit 955f917251
3 changed files with 7 additions and 0 deletions

View File

@@ -123,6 +123,9 @@ DECLARE_HOOK(android_vh_kmalloc_slab,
DECLARE_HOOK(android_vh_mmap_region,
TP_PROTO(struct vm_area_struct *vma, unsigned long addr),
TP_ARGS(vma, addr));
DECLARE_HOOK(android_vh_try_to_unmap_one,
TP_PROTO(struct vm_area_struct *vma, struct page *page, unsigned long addr, bool ret),
TP_ARGS(vma, page, addr, ret));
/* macro versions of hooks are no longer required */
#endif /* _TRACE_HOOK_MM_H */