diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 5d9030f56e32..f0ca247d88df 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -382,3 +382,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_tcp_recvmsg_stat); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pci_d3_sleep); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kmalloc_slab); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmap_region); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_try_to_unmap_one); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index c194a587764d..4b299fd6e613 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -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 */ diff --git a/mm/rmap.c b/mm/rmap.c index faeed19c8a89..b1cb10941651 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -77,6 +77,8 @@ #include +#include + #include "internal.h" static struct kmem_cache *anon_vma_cachep; @@ -1706,6 +1708,7 @@ discard: } mmu_notifier_invalidate_range_end(&range); + trace_android_vh_try_to_unmap_one(vma, page, address, ret); return ret; }