3 #define TRACE_SYSTEM rpm
5 #if !defined(LTTNG_TRACE_RUNTIME_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_RUNTIME_POWER_H
8 #include "../../../probes/lttng-tracepoint-event.h"
9 #include <linux/ktime.h>
11 #ifndef _TRACE_RPM_DEF_
12 #define _TRACE_RPM_DEF_
17 * The rpm_internal events are used for tracing some important
18 * runtime pm internal functions.
20 LTTNG_TRACEPOINT_EVENT_CLASS(rpm_internal
,
22 TP_PROTO(struct device
*dev
, int flags
),
27 __string( name
, dev_name(dev
) )
29 __field( int , usage_count
)
30 __field( int , disable_depth
)
31 __field( int , runtime_auto
)
32 __field( int , request_pending
)
33 __field( int , irq_safe
)
34 __field( int , child_count
)
38 tp_strcpy(name
, dev_name(dev
))
39 tp_assign(flags
, flags
)
40 tp_assign(usage_count
, atomic_read(&dev
->power
.usage_count
))
41 tp_assign(disable_depth
, dev
->power
.disable_depth
)
42 tp_assign(runtime_auto
, dev
->power
.runtime_auto
)
43 tp_assign(request_pending
, dev
->power
.request_pending
)
44 tp_assign(irq_safe
, dev
->power
.irq_safe
)
45 tp_assign(child_count
, atomic_read(&dev
->power
.child_count
))
48 TP_printk("%s flags-%x cnt-%-2d dep-%-2d auto-%-1d p-%-1d"
50 __get_str(name
), __entry
->flags
,
52 __entry
->disable_depth
,
53 __entry
->runtime_auto
,
54 __entry
->request_pending
,
59 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpm_internal
, rpm_suspend
,
61 TP_PROTO(struct device
*dev
, int flags
),
65 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpm_internal
, rpm_resume
,
67 TP_PROTO(struct device
*dev
, int flags
),
71 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpm_internal
, rpm_idle
,
73 TP_PROTO(struct device
*dev
, int flags
),
78 LTTNG_TRACEPOINT_EVENT(rpm_return_int
,
79 TP_PROTO(struct device
*dev
, unsigned long ip
, int ret
),
80 TP_ARGS(dev
, ip
, ret
),
83 __string( name
, dev_name(dev
))
84 __field( unsigned long, ip
)
89 tp_strcpy(name
, dev_name(dev
))
94 TP_printk("%pS:%s ret=%d", (void *)__entry
->ip
, __get_str(name
),
98 #endif /* LTTNG_TRACE_RUNTIME_POWER_H */
100 /* This part must be outside protection */
101 #include "../../../probes/define_trace.h"
This page took 0.031492 seconds and 4 git commands to generate.