• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM binder
4 #undef TRACE_INCLUDE_PATH
5 #define TRACE_INCLUDE_PATH trace/hooks
6 #if !defined(_TRACE_HOOK_BINDER_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_HOOK_BINDER_H
8 #include <trace/hooks/vendor_hooks.h>
9 /*
10  * Following tracepoints are not exported in tracefs and provide a
11  * mechanism for vendor modules to hook and extend functionality
12  */
13 struct binder_alloc;
14 struct binder_proc;
15 struct binder_thread;
16 struct binder_transaction;
17 struct task_struct;
18 struct seq_file;
19 struct binder_transaction_data;
20 
21 DECLARE_HOOK(android_vh_binder_transaction_init,
22 	TP_PROTO(struct binder_transaction *t),
23 	TP_ARGS(t));
24 DECLARE_HOOK(android_vh_binder_priority_skip,
25 	TP_PROTO(struct task_struct *task, bool *skip),
26 	TP_ARGS(task, skip));
27 DECLARE_HOOK(android_vh_binder_set_priority,
28 	TP_PROTO(struct binder_transaction *t, struct task_struct *task),
29 	TP_ARGS(t, task));
30 DECLARE_HOOK(android_vh_binder_restore_priority,
31 	TP_PROTO(struct binder_transaction *t, struct task_struct *task),
32 	TP_ARGS(t, task));
33 DECLARE_HOOK(android_vh_binder_wakeup_ilocked,
34 	TP_PROTO(struct task_struct *task, bool sync, struct binder_proc *proc),
35 	TP_ARGS(task, sync, proc));
36 DECLARE_HOOK(android_vh_binder_wait_for_work,
37 	TP_PROTO(bool do_proc_work, struct binder_thread *tsk, struct binder_proc *proc),
38 	TP_ARGS(do_proc_work, tsk, proc));
39 DECLARE_HOOK(android_vh_sync_txn_recvd,
40 	TP_PROTO(struct task_struct *tsk, struct task_struct *from),
41 	TP_ARGS(tsk, from));
42 DECLARE_HOOK(android_vh_binder_alloc_new_buf_locked,
43 	TP_PROTO(size_t size, struct binder_alloc *alloc, int is_async),
44 	TP_ARGS(size, alloc, is_async));
45 DECLARE_HOOK(android_vh_binder_reply,
46 	TP_PROTO(struct binder_proc *target_proc, struct binder_proc *proc,
47 		struct binder_thread *thread, struct binder_transaction_data *tr),
48 	TP_ARGS(target_proc, proc, thread, tr));
49 DECLARE_HOOK(android_vh_binder_trans,
50 	TP_PROTO(struct binder_proc *target_proc, struct binder_proc *proc,
51 		struct binder_thread *thread, struct binder_transaction_data *tr),
52 	TP_ARGS(target_proc, proc, thread, tr));
53 DECLARE_HOOK(android_vh_binder_preset,
54 	TP_PROTO(struct hlist_head *hhead, struct mutex *lock),
55 	TP_ARGS(hhead, lock));
56 DECLARE_HOOK(android_vh_binder_proc_transaction,
57 	TP_PROTO(struct task_struct *caller_task, struct task_struct *binder_proc_task,
58 		struct task_struct *binder_th_task, int node_debug_id,
59 		unsigned int code, bool pending_async),
60 	TP_ARGS(caller_task, binder_proc_task, binder_th_task, node_debug_id, code, pending_async));
61 DECLARE_HOOK(android_vh_binder_new_ref,
62 	TP_PROTO(struct task_struct *proc, uint32_t ref_desc, int node_debug_id),
63 	TP_ARGS(proc, ref_desc, node_debug_id));
64 DECLARE_HOOK(android_vh_binder_del_ref,
65 	TP_PROTO(struct task_struct *proc, uint32_t ref_desc),
66 	TP_ARGS(proc, ref_desc));
67 DECLARE_HOOK(android_vh_binder_print_transaction_info,
68 	TP_PROTO(struct seq_file *m, struct binder_proc *proc,
69 		 const char *prefix, struct binder_transaction *t),
70 	TP_ARGS(m, proc, prefix, t));
71 
72 /* macro versions of hooks are no longer required */
73 
74 #endif /* _TRACE_HOOK_BINDER_H */
75 /* This part must be outside protection */
76 #include <trace/define_trace.h>
77