1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #undef TRACE_SYSTEM 3 #define TRACE_SYSTEM dtask 4 #define TRACE_INCLUDE_PATH trace/hooks 5 6 #if !defined(_TRACE_HOOK_DTASK_H) || defined(TRACE_HEADER_MULTI_READ) 7 #define _TRACE_HOOK_DTASK_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 mutex; 16 DECLARE_HOOK(android_vh_mutex_wait_start, 17 TP_PROTO(struct mutex *lock), 18 TP_ARGS(lock)); 19 DECLARE_HOOK(android_vh_mutex_wait_finish, 20 TP_PROTO(struct mutex *lock), 21 TP_ARGS(lock)); 22 23 struct rw_semaphore; 24 DECLARE_HOOK(android_vh_rwsem_read_wait_start, 25 TP_PROTO(struct rw_semaphore *sem), 26 TP_ARGS(sem)); 27 DECLARE_HOOK(android_vh_rwsem_read_wait_finish, 28 TP_PROTO(struct rw_semaphore *sem), 29 TP_ARGS(sem)); 30 DECLARE_HOOK(android_vh_rwsem_write_wait_start, 31 TP_PROTO(struct rw_semaphore *sem), 32 TP_ARGS(sem)); 33 DECLARE_HOOK(android_vh_rwsem_write_wait_finish, 34 TP_PROTO(struct rw_semaphore *sem), 35 TP_ARGS(sem)); 36 37 struct task_struct; 38 DECLARE_HOOK(android_vh_sched_show_task, 39 TP_PROTO(struct task_struct *task), 40 TP_ARGS(task)); 41 #else 42 #define trace_android_vh_mutex_wait_start(lock) 43 #define trace_android_vh_mutex_wait_finish(lock) 44 #define trace_android_vh_rwsem_read_wait_start(sem) 45 #define trace_android_vh_rwsem_read_wait_finish(sem) 46 #define trace_android_vh_rwsem_write_wait_start(sem) 47 #define trace_android_vh_rwsem_write_wait_finish(sem) 48 #define trace_android_vh_sched_show_task(task) 49 #endif 50 51 #endif /* _TRACE_HOOK_DTASK_H */ 52 /* This part must be outside protection */ 53 #include <trace/define_trace.h> 54