• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM rwsem
4 #define TRACE_INCLUDE_PATH trace/hooks
5 #if !defined(_TRACE_HOOK_RWSEM_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_HOOK_RWSEM_H
7 #include <linux/tracepoint.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 #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
14 struct rw_semaphore;
15 struct rwsem_waiter;
16 DECLARE_HOOK(android_vh_rwsem_init,
17 	TP_PROTO(struct rw_semaphore *sem),
18 	TP_ARGS(sem));
19 DECLARE_HOOK(android_vh_rwsem_wake,
20 	TP_PROTO(struct rw_semaphore *sem),
21 	TP_ARGS(sem));
22 DECLARE_HOOK(android_vh_rwsem_write_finished,
23 	TP_PROTO(struct rw_semaphore *sem),
24 	TP_ARGS(sem));
25 DECLARE_HOOK(android_vh_alter_rwsem_list_add,
26 	TP_PROTO(struct rwsem_waiter *waiter,
27 		 struct rw_semaphore *sem,
28 		 bool *already_on_list),
29 	TP_ARGS(waiter, sem, already_on_list));
30 #else
31 #define trace_android_vh_rwsem_init(sem)
32 #define trace_android_vh_rwsem_wake(sem)
33 #define trace_android_vh_rwsem_write_finished(sem)
34 #define trace_android_vh_alter_rwsem_list_add(waiter, sem, already_on_list)
35 #endif
36 #endif /* _TRACE_HOOK_RWSEM_H */
37 /* This part must be outside protection */
38 #include <trace/define_trace.h>
39