blob: 3bd33b8dc7c460f71885b169077f3df9ec2adaac [file] [log] [blame]
Jean Pihet4b95f132011-01-05 19:49:02 +01001
2 Subsystem Trace Points: power
3
4The power tracing system captures events related to power transitions
5within the kernel. Broadly speaking there are three major subheadings:
6
7 o Power state switch which reports events related to suspend (S-states),
8 cpuidle (C-states) and cpufreq (P-states)
9 o System clock related changes
10 o Power domains related changes and transitions
11
12This document describes what each of the tracepoints is and why they
13might be useful.
14
15Cf. include/trace/events/power.h for the events definitions.
16
171. Power state switch events
18============================
19
Paul Gortmaker43720bd2013-01-11 13:43:45 +0100201.1 Trace API
Jean Pihet4b95f132011-01-05 19:49:02 +010021-----------------
22
23A 'cpu' event class gathers the CPU-related events: cpuidle and
24cpufreq.
25
26cpu_idle "state=%lu cpu_id=%lu"
27cpu_frequency "state=%lu cpu_id=%lu"
28
29A suspend event is used to indicate the system going in and out of the
30suspend mode:
31
32machine_suspend "state=%lu"
33
34
35Note: the value of '-1' or '4294967295' for state means an exit from the current state,
36i.e. trace_cpu_idle(4, smp_processor_id()) means that the system
37enters the idle state 4, while trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id())
38means that the system exits the previous idle state.
39
40The event which has 'state=4294967295' in the trace is very important to the user
41space tools which are using it to detect the end of the current state, and so to
42correctly draw the states diagrams and to calculate accurate statistics etc.
43
Jean Pihet4b95f132011-01-05 19:49:02 +0100442. Clocks events
45================
46The clock events are used for clock enable/disable and for
47clock rate change.
48
49clock_enable "%s state=%lu cpu_id=%lu"
50clock_disable "%s state=%lu cpu_id=%lu"
51clock_set_rate "%s state=%lu cpu_id=%lu"
52
53The first parameter gives the clock name (e.g. "gpio1_iclk").
54The second parameter is '1' for enable, '0' for disable, the target
55clock rate for set_rate.
56
573. Power domains events
58=======================
59The power domain events are used for power domains transitions
60
61power_domain_target "%s state=%lu cpu_id=%lu"
62
63The first parameter gives the power domain name (e.g. "mpu_pwrdm").
64The second parameter is the power domain target state.
65
Saharaf5ce1572013-06-21 11:12:31 +0900664. PM QoS events
67================
68The PM QoS events are used for QoS add/update/remove request and for
69target/flags update.
70
71pm_qos_add_request "pm_qos_class=%s value=%d"
72pm_qos_update_request "pm_qos_class=%s value=%d"
73pm_qos_remove_request "pm_qos_class=%s value=%d"
74pm_qos_update_request_timeout "pm_qos_class=%s value=%d, timeout_us=%ld"
75
76The first parameter gives the QoS class name (e.g. "CPU_DMA_LATENCY").
77The second parameter is value to be added/updated/removed.
78The third parameter is timeout value in usec.
79
80pm_qos_update_target "action=%s prev_value=%d curr_value=%d"
81pm_qos_update_flags "action=%s prev_value=0x%x curr_value=0x%x"
82
83The first parameter gives the QoS action name (e.g. "ADD_REQ").
84The second parameter is the previous QoS value.
85The third parameter is the current QoS value to update.
86
87And, there are also events used for device PM QoS add/update/remove request.
88
89dev_pm_qos_add_request "device=%s type=%s new_value=%d"
90dev_pm_qos_update_request "device=%s type=%s new_value=%d"
91dev_pm_qos_remove_request "device=%s type=%s new_value=%d"
92
93The first parameter gives the device name which tries to add/update/remove
94QoS requests.
95The second parameter gives the request type (e.g. "DEV_PM_QOS_LATENCY").
96The third parameter is value to be added/updated/removed.