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 <linux/tracepoint.h> 9 #include <trace/hooks/vendor_hooks.h> 10 /* 11 * Following tracepoints are not exported in tracefs and provide a 12 * mechanism for vendor modules to hook and extend functionality 13 */ 14 #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) 15 struct binder_transaction; 16 struct task_struct; 17 DECLARE_HOOK(android_vh_binder_transaction_init, 18 TP_PROTO(struct binder_transaction *t), 19 TP_ARGS(t)); 20 DECLARE_HOOK(android_vh_binder_set_priority, 21 TP_PROTO(struct binder_transaction *t, struct task_struct *task), 22 TP_ARGS(t, task)); 23 DECLARE_HOOK(android_vh_binder_restore_priority, 24 TP_PROTO(struct binder_transaction *t, struct task_struct *task), 25 TP_ARGS(t, task)); 26 #else 27 #define trace_android_vh_binder_transaction_init(t) 28 #define trace_android_vh_binder_set_priority(t, task) 29 #define trace_android_vh_binder_restore_priority(t, task) 30 #endif 31 #endif /* _TRACE_HOOK_BINDER_H */ 32 /* This part must be outside protection */ 33 #include <trace/define_trace.h> 34