Commit | Line | Data |
---|---|---|
b87700e3 AG |
1 | |
2 | #undef TRACE_SYSTEM | |
3 | #define TRACE_SYSTEM rpm | |
4 | ||
3bc29f0a MD |
5 | #if !defined(LTTNG_TRACE_RUNTIME_POWER_H) || defined(TRACE_HEADER_MULTI_READ) |
6 | #define LTTNG_TRACE_RUNTIME_POWER_H | |
b87700e3 | 7 | |
3bc29f0a | 8 | #include "../../../probes/lttng-tracepoint-event.h" |
b87700e3 | 9 | #include <linux/ktime.h> |
b87700e3 AG |
10 | |
11 | #ifndef _TRACE_RPM_DEF_ | |
12 | #define _TRACE_RPM_DEF_ | |
13 | struct device; | |
14 | #endif | |
15 | ||
16 | /* | |
17 | * The rpm_internal events are used for tracing some important | |
18 | * runtime pm internal functions. | |
19 | */ | |
3bc29f0a | 20 | LTTNG_TRACEPOINT_EVENT_CLASS(rpm_internal, |
b87700e3 AG |
21 | |
22 | TP_PROTO(struct device *dev, int flags), | |
23 | ||
24 | TP_ARGS(dev, flags), | |
25 | ||
f127e61e MD |
26 | TP_FIELDS( |
27 | ctf_string(name, dev_name(dev)) | |
28 | ctf_integer(int, flags, flags) | |
29 | ctf_integer(int, usage_count, atomic_read(&dev->power.usage_count)) | |
30 | ctf_integer(int, disable_depth, dev->power.disable_depth) | |
31 | ctf_integer(int, runtime_auto, dev->power.runtime_auto) | |
32 | ctf_integer(int, request_pending, dev->power.request_pending) | |
33 | ctf_integer(int, irq_safe, dev->power.irq_safe) | |
34 | ctf_integer(int, child_count, atomic_read(&dev->power.child_count)) | |
35 | ) | |
b87700e3 | 36 | ) |
f127e61e | 37 | |
3bc29f0a | 38 | LTTNG_TRACEPOINT_EVENT_INSTANCE(rpm_internal, rpm_suspend, |
b87700e3 AG |
39 | |
40 | TP_PROTO(struct device *dev, int flags), | |
41 | ||
42 | TP_ARGS(dev, flags) | |
43 | ) | |
f127e61e | 44 | |
3bc29f0a | 45 | LTTNG_TRACEPOINT_EVENT_INSTANCE(rpm_internal, rpm_resume, |
b87700e3 AG |
46 | |
47 | TP_PROTO(struct device *dev, int flags), | |
48 | ||
49 | TP_ARGS(dev, flags) | |
50 | ) | |
f127e61e | 51 | |
3bc29f0a | 52 | LTTNG_TRACEPOINT_EVENT_INSTANCE(rpm_internal, rpm_idle, |
b87700e3 AG |
53 | |
54 | TP_PROTO(struct device *dev, int flags), | |
55 | ||
56 | TP_ARGS(dev, flags) | |
57 | ) | |
58 | ||
3bc29f0a | 59 | LTTNG_TRACEPOINT_EVENT(rpm_return_int, |
b87700e3 AG |
60 | TP_PROTO(struct device *dev, unsigned long ip, int ret), |
61 | TP_ARGS(dev, ip, ret), | |
62 | ||
f127e61e MD |
63 | TP_FIELDS( |
64 | ctf_string(name, dev_name(dev)) | |
65 | ctf_integer(unsigned long, ip, ip) | |
66 | ctf_integer(int, ret, ret) | |
67 | ) | |
b87700e3 AG |
68 | ) |
69 | ||
3bc29f0a | 70 | #endif /* LTTNG_TRACE_RUNTIME_POWER_H */ |
b87700e3 AG |
71 | |
72 | /* This part must be outside protection */ | |
73 | #include "../../../probes/define_trace.h" |