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_do_futex, 21 TP_PROTO(int cmd, 22 unsigned int *flags, 23 u32 __user *uaddr2), 24 TP_ARGS(cmd, flags, uaddr2)); 25 DECLARE_HOOK(android_vh_futex_wait_start, 26 TP_PROTO(unsigned int flags, 27 u32 bitset), 28 TP_ARGS(flags, bitset)); 29 DECLARE_HOOK(android_vh_futex_wait_end, 30 TP_PROTO(unsigned int flags, 31 u32 bitset), 32 TP_ARGS(flags, bitset)); 33 DECLARE_HOOK(android_vh_futex_wake_traverse_plist, 34 TP_PROTO(struct plist_head *chain, int *target_nr, 35 union futex_key key, u32 bitset), 36 TP_ARGS(chain, target_nr, key, bitset)); 37 DECLARE_HOOK(android_vh_futex_wake_this, 38 TP_PROTO(int ret, int nr_wake, int target_nr, 39 struct task_struct *p), 40 TP_ARGS(ret, nr_wake, target_nr, p)); 41 DECLARE_HOOK(android_vh_futex_wake_up_q_finish, 42 TP_PROTO(int nr_wake, int target_nr), 43 TP_ARGS(nr_wake, target_nr)); 44 DECLARE_HOOK(android_vh_futex_sleep_start, 45 TP_PROTO(struct task_struct *p), 46 TP_ARGS(p)); 47 48 #endif /* _TRACE_HOOK_FUTEX_H */ 49 /* This part must be outside protection */ 50 #include <trace/define_trace.h> 51