1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #undef TRACE_SYSTEM 3 #define TRACE_SYSTEM futex 4 #undef TRACE_INCLUDE_PATH 5 #define TRACE_INCLUDE_PATH trace/hooks 6 #if !defined(_TRACE_HOOK_FUTEX_H) || defined(TRACE_HEADER_MULTI_READ) 7 #define _TRACE_HOOK_FUTEX_H 8 #include <trace/hooks/vendor_hooks.h> 9 10 struct plist_node; 11 struct plist_head; 12 /* 13 * Following tracepoints are not exported in tracefs and provide a 14 * mechanism for vendor modules to hook and extend functionality 15 */ 16 DECLARE_HOOK(android_vh_alter_futex_plist_add, 17 TP_PROTO(struct plist_node *node, 18 struct plist_head *head, 19 bool *already_on_hb), 20 TP_ARGS(node, head, already_on_hb)); 21 22 DECLARE_HOOK(android_vh_futex_sleep_start, 23 TP_PROTO(struct task_struct *p), 24 TP_ARGS(p)); 25 DECLARE_HOOK(android_vh_do_futex, 26 TP_PROTO(int cmd, 27 unsigned int *flags, 28 u32 __user *uaddr2), 29 TP_ARGS(cmd, flags, uaddr2)); 30 DECLARE_HOOK(android_vh_futex_wait_start, 31 TP_PROTO(unsigned int flags, 32 u32 bitset), 33 TP_ARGS(flags, bitset)); 34 DECLARE_HOOK(android_vh_futex_wait_end, 35 TP_PROTO(unsigned int flags, 36 u32 bitset), 37 TP_ARGS(flags, bitset)); 38 DECLARE_HOOK(android_vh_futex_wake_traverse_plist, 39 TP_PROTO(struct plist_head *chain, int *target_nr, 40 union futex_key key, u32 bitset), 41 TP_ARGS(chain, target_nr, key, bitset)); 42 DECLARE_HOOK(android_vh_futex_wake_this, 43 TP_PROTO(int ret, int nr_wake, int target_nr, 44 struct task_struct *p), 45 TP_ARGS(ret, nr_wake, target_nr, p)); 46 DECLARE_HOOK(android_vh_futex_wake_up_q_finish, 47 TP_PROTO(int nr_wake, int target_nr), 48 TP_ARGS(nr_wake, target_nr)); 49 #endif /* _TRACE_HOOK_FUTEX_H */ 50 /* This part must be outside protection */ 51 #include <trace/define_trace.h> 52