• 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 <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 
14 /* needed for enum freq_qos_req_types */
15 #include <linux/pm_qos.h>
16 
17 struct freq_constraints;
18 struct freq_qos_request;
19 struct task_struct;
20 
21 DECLARE_HOOK(android_vh_try_to_freeze_todo,
22 	TP_PROTO(unsigned int todo, unsigned int elapsed_msecs, bool wq_busy),
23 	TP_ARGS(todo, elapsed_msecs, wq_busy));
24 
25 DECLARE_HOOK(android_vh_try_to_freeze_todo_logging,
26 	TP_PROTO(bool *logging_on),
27 	TP_ARGS(logging_on));
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