events-power.txt 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Subsystem Trace Points: power
  2. The power tracing system captures events related to power transitions
  3. within the kernel. Broadly speaking there are three major subheadings:
  4. o Power state switch which reports events related to suspend (S-states),
  5. cpuidle (C-states) and cpufreq (P-states)
  6. o System clock related changes
  7. o Power domains related changes and transitions
  8. This document describes what each of the tracepoints is and why they
  9. might be useful.
  10. Cf. include/trace/events/power.h for the events definitions.
  11. 1. Power state switch events
  12. ============================
  13. 1.1 Trace API
  14. -----------------
  15. A 'cpu' event class gathers the CPU-related events: cpuidle and
  16. cpufreq.
  17. cpu_idle "state=%lu cpu_id=%lu"
  18. cpu_frequency "state=%lu cpu_id=%lu"
  19. A suspend event is used to indicate the system going in and out of the
  20. suspend mode:
  21. machine_suspend "state=%lu"
  22. Note: the value of '-1' or '4294967295' for state means an exit from the current state,
  23. i.e. trace_cpu_idle(4, smp_processor_id()) means that the system
  24. enters the idle state 4, while trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id())
  25. means that the system exits the previous idle state.
  26. The event which has 'state=4294967295' in the trace is very important to the user
  27. space tools which are using it to detect the end of the current state, and so to
  28. correctly draw the states diagrams and to calculate accurate statistics etc.
  29. 2. Clocks events
  30. ================
  31. The clock events are used for clock enable/disable and for
  32. clock rate change.
  33. clock_enable "%s state=%lu cpu_id=%lu"
  34. clock_disable "%s state=%lu cpu_id=%lu"
  35. clock_set_rate "%s state=%lu cpu_id=%lu"
  36. The first parameter gives the clock name (e.g. "gpio1_iclk").
  37. The second parameter is '1' for enable, '0' for disable, the target
  38. clock rate for set_rate.
  39. 3. Power domains events
  40. =======================
  41. The power domain events are used for power domains transitions
  42. power_domain_target "%s state=%lu cpu_id=%lu"
  43. The first parameter gives the power domain name (e.g. "mpu_pwrdm").
  44. The second parameter is the power domain target state.