Back to home page

OSCL-LXR

 
 

    


0001 =============================
0002 Subsystem Trace Points: power
0003 =============================
0004 
0005 The power tracing system captures events related to power transitions
0006 within the kernel. Broadly speaking there are three major subheadings:
0007 
0008   - Power state switch which reports events related to suspend (S-states),
0009     cpuidle (C-states) and cpufreq (P-states)
0010   - System clock related changes
0011   - Power domains related changes and transitions
0012 
0013 This document describes what each of the tracepoints is and why they
0014 might be useful.
0015 
0016 Cf. include/trace/events/power.h for the events definitions.
0017 
0018 1. Power state switch events
0019 ============================
0020 
0021 1.1 Trace API
0022 -----------------
0023 
0024 A 'cpu' event class gathers the CPU-related events: cpuidle and
0025 cpufreq.
0026 ::
0027 
0028   cpu_idle              "state=%lu cpu_id=%lu"
0029   cpu_frequency         "state=%lu cpu_id=%lu"
0030   cpu_frequency_limits  "min=%lu max=%lu cpu_id=%lu"
0031 
0032 A suspend event is used to indicate the system going in and out of the
0033 suspend mode:
0034 ::
0035 
0036   machine_suspend               "state=%lu"
0037 
0038 
0039 Note: the value of '-1' or '4294967295' for state means an exit from the current state,
0040 i.e. trace_cpu_idle(4, smp_processor_id()) means that the system
0041 enters the idle state 4, while trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id())
0042 means that the system exits the previous idle state.
0043 
0044 The event which has 'state=4294967295' in the trace is very important to the user
0045 space tools which are using it to detect the end of the current state, and so to
0046 correctly draw the states diagrams and to calculate accurate statistics etc.
0047 
0048 2. Clocks events
0049 ================
0050 The clock events are used for clock enable/disable and for
0051 clock rate change.
0052 ::
0053 
0054   clock_enable          "%s state=%lu cpu_id=%lu"
0055   clock_disable         "%s state=%lu cpu_id=%lu"
0056   clock_set_rate                "%s state=%lu cpu_id=%lu"
0057 
0058 The first parameter gives the clock name (e.g. "gpio1_iclk").
0059 The second parameter is '1' for enable, '0' for disable, the target
0060 clock rate for set_rate.
0061 
0062 3. Power domains events
0063 =======================
0064 The power domain events are used for power domains transitions
0065 ::
0066 
0067   power_domain_target   "%s state=%lu cpu_id=%lu"
0068 
0069 The first parameter gives the power domain name (e.g. "mpu_pwrdm").
0070 The second parameter is the power domain target state.
0071 
0072 4. PM QoS events
0073 ================
0074 The PM QoS events are used for QoS add/update/remove request and for
0075 target/flags update.
0076 ::
0077 
0078   pm_qos_update_target               "action=%s prev_value=%d curr_value=%d"
0079   pm_qos_update_flags                "action=%s prev_value=0x%x curr_value=0x%x"
0080 
0081 The first parameter gives the QoS action name (e.g. "ADD_REQ").
0082 The second parameter is the previous QoS value.
0083 The third parameter is the current QoS value to update.
0084 
0085 There are also events used for device PM QoS add/update/remove request.
0086 ::
0087 
0088   dev_pm_qos_add_request             "device=%s type=%s new_value=%d"
0089   dev_pm_qos_update_request          "device=%s type=%s new_value=%d"
0090   dev_pm_qos_remove_request          "device=%s type=%s new_value=%d"
0091 
0092 The first parameter gives the device name which tries to add/update/remove
0093 QoS requests.
0094 The second parameter gives the request type (e.g. "DEV_PM_QOS_RESUME_LATENCY").
0095 The third parameter is value to be added/updated/removed.
0096 
0097 And, there are events used for CPU latency QoS add/update/remove request.
0098 ::
0099 
0100   pm_qos_add_request        "value=%d"
0101   pm_qos_update_request     "value=%d"
0102   pm_qos_remove_request     "value=%d"
0103 
0104 The parameter is the value to be added/updated/removed.