3 #define TRACE_SYSTEM rpm
5 #if !defined(_TRACE_RUNTIME_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_RUNTIME_POWER_H
8 #include <linux/ktime.h>
9 #include <linux/tracepoint.h>
14 * The rpm_internal events are used for tracing some important
15 * runtime pm internal functions.
17 DECLARE_EVENT_CLASS(rpm_internal
,
19 TP_PROTO(struct device
*dev
, int flags
),
24 __string( name
, dev_name(dev
) )
26 __field( int , usage_count
)
27 __field( int , disable_depth
)
28 __field( int , runtime_auto
)
29 __field( int , request_pending
)
30 __field( int , irq_safe
)
31 __field( int , child_count
)
35 __assign_str(name
, dev_name(dev
));
36 __entry
->flags
= flags
;
37 __entry
->usage_count
= atomic_read(
38 &dev
->power
.usage_count
);
39 __entry
->disable_depth
= dev
->power
.disable_depth
;
40 __entry
->runtime_auto
= dev
->power
.runtime_auto
;
41 __entry
->request_pending
= dev
->power
.request_pending
;
42 __entry
->irq_safe
= dev
->power
.irq_safe
;
43 __entry
->child_count
= atomic_read(
44 &dev
->power
.child_count
);
47 TP_printk("%s flags-%x cnt-%-2d dep-%-2d auto-%-1d p-%-1d"
49 __get_str(name
), __entry
->flags
,
51 __entry
->disable_depth
,
52 __entry
->runtime_auto
,
53 __entry
->request_pending
,
58 DEFINE_EVENT(rpm_internal
, rpm_suspend
,
60 TP_PROTO(struct device
*dev
, int flags
),
64 DEFINE_EVENT(rpm_internal
, rpm_resume
,
66 TP_PROTO(struct device
*dev
, int flags
),
70 DEFINE_EVENT(rpm_internal
, rpm_idle
,
72 TP_PROTO(struct device
*dev
, int flags
),
77 TRACE_EVENT(rpm_return_int
,
78 TP_PROTO(struct device
*dev
, unsigned long ip
, int ret
),
79 TP_ARGS(dev
, ip
, ret
),
82 __string( name
, dev_name(dev
))
83 __field( unsigned long, ip
)
88 __assign_str(name
, dev_name(dev
));
93 TP_printk("%pS:%s ret=%d", (void *)__entry
->ip
, __get_str(name
),
97 #endif /* _TRACE_RUNTIME_POWER_H */
99 /* This part must be outside protection */
100 #include <trace/define_trace.h>
This page took 0.030683 seconds and 4 git commands to generate.