ANDROID: vendor_hooks: Add hooks for binder proc transaction
We need pointers to proc and t, the current hooks in binder_proc_transaction are unable to use. Bug: 208910215 Change-Id: I730964f965a015e5f5a3e237d9b3bd084b5bd0d0 Signed-off-by: Liujie Xie <xieliujie@oppo.com>
This commit is contained in:
@@ -2535,7 +2535,8 @@ static int binder_proc_transaction(struct binder_transaction *t,
|
|||||||
|
|
||||||
trace_android_vh_binder_proc_transaction_end(current, proc->tsk,
|
trace_android_vh_binder_proc_transaction_end(current, proc->tsk,
|
||||||
thread ? thread->task : NULL, t->code, pending_async, !oneway);
|
thread ? thread->task : NULL, t->code, pending_async, !oneway);
|
||||||
|
trace_android_vh_binder_proc_transaction_finish(proc, t,
|
||||||
|
thread ? thread->task : NULL, pending_async, !oneway);
|
||||||
if (!pending_async)
|
if (!pending_async)
|
||||||
binder_wakeup_thread_ilocked(proc, thread, !oneway /* sync */);
|
binder_wakeup_thread_ilocked(proc, thread, !oneway /* sync */);
|
||||||
|
|
||||||
|
@@ -279,6 +279,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_binder_transaction);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_preset);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_preset);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_end);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_end);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_finish);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg);
|
||||||
|
@@ -69,6 +69,10 @@ DECLARE_HOOK(android_vh_binder_proc_transaction_end,
|
|||||||
struct task_struct *binder_th_task, unsigned int code,
|
struct task_struct *binder_th_task, unsigned int code,
|
||||||
bool pending_async, bool sync),
|
bool pending_async, bool sync),
|
||||||
TP_ARGS(caller_task, binder_proc_task, binder_th_task, code, pending_async, sync));
|
TP_ARGS(caller_task, binder_proc_task, binder_th_task, code, pending_async, sync));
|
||||||
|
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_new_ref,
|
DECLARE_HOOK(android_vh_binder_new_ref,
|
||||||
TP_PROTO(struct task_struct *proc, uint32_t ref_desc, int node_debug_id),
|
TP_PROTO(struct task_struct *proc, uint32_t ref_desc, int node_debug_id),
|
||||||
TP_ARGS(proc, ref_desc, node_debug_id));
|
TP_ARGS(proc, ref_desc, node_debug_id));
|
||||||
@@ -98,6 +102,7 @@ DECLARE_HOOK(android_vh_binder_read_done,
|
|||||||
DECLARE_HOOK(android_vh_binder_has_work_ilocked,
|
DECLARE_HOOK(android_vh_binder_has_work_ilocked,
|
||||||
TP_PROTO(struct binder_thread *thread, bool do_proc_work, int *ret),
|
TP_PROTO(struct binder_thread *thread, bool do_proc_work, int *ret),
|
||||||
TP_ARGS(thread, do_proc_work, ret));
|
TP_ARGS(thread, do_proc_work, ret));
|
||||||
|
|
||||||
/* macro versions of hooks are no longer required */
|
/* macro versions of hooks are no longer required */
|
||||||
|
|
||||||
#endif /* _TRACE_HOOK_BINDER_H */
|
#endif /* _TRACE_HOOK_BINDER_H */
|
||||||
|
Reference in New Issue
Block a user