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 * Following tracepoints are not exported in tracefs and provide a 11 * mechanism for vendor modules to hook and extend functionality 12 */ 13 struct plist_node; 14 struct plist_head; 15 DECLARE_HOOK(android_vh_alter_futex_plist_add, 16 TP_PROTO(struct plist_node *node, 17 struct plist_head *head, 18 bool *already_on_hb), 19 TP_ARGS(node, head, already_on_hb)); 20 DECLARE_HOOK(android_vh_futex_sleep_start, 21 TP_PROTO(struct task_struct *p), 22 TP_ARGS(p)); 23 DECLARE_HOOK(android_vh_do_futex, 24 TP_PROTO(int cmd, 25 unsigned int *flags, 26 u32 __user *uaddr2), 27 TP_ARGS(cmd, flags, uaddr2)); 28 DECLARE_HOOK(android_vh_futex_wait_start, 29 TP_PROTO(unsigned int flags, 30 u32 bitset), 31 TP_ARGS(flags, bitset)); 32 DECLARE_HOOK(android_vh_futex_wait_end, 33 TP_PROTO(unsigned int flags, 34 u32 bitset), 35 TP_ARGS(flags, bitset)); 36 DECLARE_HOOK(android_vh_futex_wake_traverse_plist, 37 TP_PROTO(struct plist_head *chain, int *target_nr, 38 union futex_key key, u32 bitset), 39 TP_ARGS(chain, target_nr, key, bitset)); 40 DECLARE_HOOK(android_vh_futex_wake_this, 41 TP_PROTO(int ret, int nr_wake, int target_nr, 42 struct task_struct *p), 43 TP_ARGS(ret, nr_wake, target_nr, p)); 44 DECLARE_HOOK(android_vh_futex_wake_up_q_finish, 45 TP_PROTO(int nr_wake, int target_nr), 46 TP_ARGS(nr_wake, target_nr)); 47 #endif /* _TRACE_HOOK_FUTEX_H */ 48 /* This part must be outside protection */ 49 #include <trace/define_trace.h> 50