ANDROID: vendor_hooks: add hooks to modify pageflags

These hooks are designed to set or clear OEM reserved pageflags when the
memory state may change.

Bug: 336964184

Change-Id: I9cb288ef6eef7a719d4f4748d6b71010645b7d50
Signed-off-by: Xiaofeng Yuan <yuanxiaofeng@vivo.com>
This commit is contained in:
Xiaofeng Yuan
2024-06-25 19:56:31 +08:00
parent a5d073d697
commit 284a6a930d
5 changed files with 32 additions and 0 deletions

View File

@@ -370,6 +370,22 @@ DECLARE_HOOK(android_vh_do_swap_page_spf,
DECLARE_HOOK(android_vh_tune_fault_around_bytes,
TP_PROTO(unsigned long *fault_around_bytes),
TP_ARGS(fault_around_bytes));
DECLARE_HOOK(android_vh_do_anonymous_page,
TP_PROTO(struct vm_area_struct *vma, struct page *page),
TP_ARGS(vma, page));
DECLARE_HOOK(android_vh_do_swap_page,
TP_PROTO(struct page *page, pte_t *pte, struct vm_fault *vmf,
swp_entry_t entry),
TP_ARGS(page, pte, vmf, entry));
DECLARE_HOOK(android_vh_do_wp_page,
TP_PROTO(struct page *page),
TP_ARGS(page));
DECLARE_HOOK(android_vh_uprobes_replace_page,
TP_PROTO(struct page *new_page, struct page *old_page),
TP_ARGS(new_page, old_page));
DECLARE_HOOK(android_vh_shmem_swapin_page,
TP_PROTO(struct page *page),
TP_ARGS(page));
#endif /* _TRACE_HOOK_MM_H */
/* This part must be outside protection */