ANDROID: vendor_hooks: Add hook for binder_alloc_new_buf_locked

Add hook for binder_alloc_new_buf_locked, which gives the vendor a
choice whether or not this alloc new buf should go on or not.

Bug: 322915513
Change-Id: Ie7f1567dae6dee0fb22b014cd1eacc3308ccb205
Signed-off-by: chenweitao <chenweitao@oppo.com>
This commit is contained in:
chenweitao
2025-03-06 14:57:31 +08:00
committed by Todd Kjos
parent e06f8ae2a9
commit 69297c886b
3 changed files with 16 additions and 0 deletions
+3
View File
@@ -26,6 +26,9 @@ DECLARE_HOOK(android_vh_binder_set_priority,
DECLARE_HOOK(android_vh_binder_restore_priority,
TP_PROTO(struct binder_transaction *t, struct task_struct *task),
TP_ARGS(t, task));
DECLARE_HOOK(android_vh_binder_alloc_new_buf_locked,
TP_PROTO(size_t size, size_t *free_async_space, int is_async, bool *should_fail),
TP_ARGS(size, free_async_space, is_async, should_fail));
DECLARE_HOOK(android_vh_binder_wait_for_work,
TP_PROTO(bool do_proc_work, struct binder_thread *tsk, struct binder_proc *proc),
TP_ARGS(do_proc_work, tsk, proc));