ANDROID: vendor_hooks: Add hooks for binder proc transaction
When servicemanager process added service proxy from other process register the service, we want to know the matching relation between handle in the process and service name. When binder transaction happened, We want to know what process calls what method on what service. Patch 3482670 was uploaded in this patchset to avoid conflict. Bug: 186604985 Bug: 395737475 Signed-off-by: zhengding chen <chenzhengding@oppo.com> Change-Id: I813d1cde10294d8665f899f7fef0d444ec1f1f5e Signed-off-by: shenshen mao <maoshenshen@oppo.com> Signed-off-by: xiaosa liang <liangxiaosa@oppo.com>
This commit is contained in:
committed by
xiaosa liang
parent
f91b1cf94b
commit
02ea01fd0f
@@ -36,6 +36,10 @@ DECLARE_HOOK(android_vh_binder_proc_transaction_finish,
|
||||
TP_PROTO(struct binder_proc *proc, struct binder_transaction *t,
|
||||
struct task_struct *binder_th_task, bool pending_async, bool sync),
|
||||
TP_ARGS(proc, t, binder_th_task, pending_async, sync));
|
||||
DECLARE_HOOK(android_vh_binder_select_special_worklist,
|
||||
TP_PROTO(struct list_head **list, struct binder_thread *thread, struct binder_proc *proc,
|
||||
int wait_for_proc_work, bool *nothing_to_do),
|
||||
TP_ARGS(list, thread, proc, wait_for_proc_work, nothing_to_do));
|
||||
DECLARE_HOOK(android_vh_alloc_oem_binder_struct,
|
||||
TP_PROTO(struct binder_transaction_data *tr, struct binder_transaction *t,
|
||||
struct binder_proc *proc),
|
||||
@@ -56,8 +60,23 @@ DECLARE_HOOK(android_vh_binder_buffer_release,
|
||||
TP_PROTO(struct binder_proc *proc, struct binder_thread *thread,
|
||||
struct binder_buffer *buffer, bool has_transaction),
|
||||
TP_ARGS(proc, thread, buffer, has_transaction));
|
||||
struct binder_proc;
|
||||
struct binder_thread;
|
||||
DECLARE_HOOK(android_vh_binder_ioctl_end,
|
||||
TP_PROTO(struct task_struct *caller_task,
|
||||
unsigned int cmd,
|
||||
unsigned long arg,
|
||||
struct binder_thread *thread,
|
||||
struct binder_proc *proc,
|
||||
int *ret),
|
||||
TP_ARGS(caller_task, cmd, arg, thread, proc, ret));
|
||||
DECLARE_HOOK(android_vh_binder_looper_exited,
|
||||
TP_PROTO(struct binder_thread *thread, struct binder_proc *proc),
|
||||
TP_ARGS(thread, proc));
|
||||
DECLARE_HOOK(android_vh_binder_spawn_new_thread,
|
||||
TP_PROTO(struct binder_thread *thread, struct binder_proc *proc, bool *force_spawn),
|
||||
TP_ARGS(thread, proc, force_spawn));
|
||||
DECLARE_HOOK(android_vh_binder_has_special_work_ilocked,
|
||||
TP_PROTO(struct binder_thread *thread, bool do_proc_work, bool *has_work),
|
||||
TP_ARGS(thread, do_proc_work, has_work));
|
||||
DECLARE_HOOK(android_vh_binder_list_add_work,
|
||||
TP_PROTO(struct binder_work *work, struct list_head *target_list),
|
||||
TP_ARGS(work, target_list));
|
||||
@@ -73,7 +92,6 @@ DECLARE_HOOK(android_vh_binder_free_proc,
|
||||
DECLARE_HOOK(android_vh_binder_preset,
|
||||
TP_PROTO(struct hlist_head *hhead, struct mutex *lock, struct binder_proc *proc),
|
||||
TP_ARGS(hhead, lock, proc));
|
||||
struct binder_transaction_data;
|
||||
DECLARE_HOOK(android_vh_binder_reply,
|
||||
TP_PROTO(struct binder_proc *target_proc, struct binder_proc *proc,
|
||||
struct binder_thread *thread, struct binder_transaction_data *tr),
|
||||
@@ -82,6 +100,15 @@ DECLARE_HOOK(android_vh_binder_trans,
|
||||
TP_PROTO(struct binder_proc *target_proc, struct binder_proc *proc,
|
||||
struct binder_thread *thread, struct binder_transaction_data *tr),
|
||||
TP_ARGS(target_proc, proc, thread, tr));
|
||||
DECLARE_HOOK(android_vh_binder_proc_transaction,
|
||||
TP_PROTO(struct task_struct *caller_task, struct task_struct *binder_proc_task,
|
||||
struct task_struct *binder_th_task, int node_debug_id,
|
||||
struct binder_transaction *t, bool pending_async),
|
||||
TP_ARGS(caller_task, binder_proc_task, binder_th_task, node_debug_id, t, pending_async));
|
||||
DECLARE_HOOK(android_vh_binder_thread_read,
|
||||
TP_PROTO(struct list_head **list, struct binder_proc *proc,
|
||||
struct binder_thread *thread),
|
||||
TP_ARGS(list, proc, thread));
|
||||
#endif /* _TRACE_HOOK_BINDER_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
Reference in New Issue
Block a user