• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM power
4 #define TRACE_INCLUDE_PATH trace/hooks
5 
6 #if !defined(_TRACE_HOOK_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_HOOK_POWER_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 #ifdef __GENKSYMS__
15 enum freq_qos_req_type;
16 struct freq_constraints;
17 struct freq_qos_request;
18 struct task_struct;
19 #else
20 /* enum freq_qos_req_type, struct freq_constraints, struct freq_qos_request */
21 #include <linux/pm_qos.h>
22 /* struct task_struct */
23 #include <linux/sched.h>
24 #endif /* __GENKSYMS__ */
25 DECLARE_HOOK(android_vh_try_to_freeze_todo,
26 	TP_PROTO(unsigned int todo, unsigned int elapsed_msecs, bool wq_busy),
27 	TP_ARGS(todo, elapsed_msecs, wq_busy));
28 
29 DECLARE_HOOK(android_vh_try_to_freeze_todo_unfrozen,
30 	TP_PROTO(struct task_struct *p),
31 	TP_ARGS(p));
32 
33 
34 DECLARE_HOOK(android_vh_freq_qos_add_request,
35 	TP_PROTO(struct freq_constraints *qos, struct freq_qos_request *req,
36 		enum freq_qos_req_type type, int value, int ret),
37 	TP_ARGS(qos, req, type, value, ret));
38 
39 DECLARE_HOOK(android_vh_freq_qos_update_request,
40 		TP_PROTO(struct freq_qos_request *req, int value),
41 		TP_ARGS(req, value));
42 
43 DECLARE_HOOK(android_vh_freq_qos_remove_request,
44 		TP_PROTO(struct freq_qos_request *req),
45 		TP_ARGS(req));
46 
47 /* macro versions of hooks are no longer required */
48 
49 #endif /* _TRACE_HOOK_POWER_H */
50 /* This part must be outside protection */
51 #include <trace/define_trace.h>
52