aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Pihet <j-pihet@ti.com>2011-01-05 13:49:02 -0500
committerIngo Molnar <mingo@elte.hu>2011-01-05 15:25:29 -0500
commit4b95f135f606c87e4056b6d7fd3c5781c818858b (patch)
treefb2ca090436141cd1c2641ab313e14e564a92afe
parent938cfed18bec2c7361f37efc954712a7cc42c353 (diff)
tools, perf: Documentation for the power events API
Provides documentation for the following: - the new power trace API, - the old (legacy) power trace API, - the DEPRECATED Kconfig option usage. Signed-off-by: Jean Pihet <j-pihet@ti.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: trenn@suse.de Cc: Len Brown <len.brown@intel.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: linux-pm@lists.linux-foundation.org LKML-Reference: <1294253342-29056-3-git-send-email-j-pihet@ti.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--Documentation/trace/events-power.txt90
1 files changed, 90 insertions, 0 deletions
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt
new file mode 100644
index 000000000000..96d87b67fe37
--- /dev/null
+++ b/Documentation/trace/events-power.txt
@@ -0,0 +1,90 @@
1
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
201.1 New trace API
21-----------------
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
441.2 DEPRECATED trace API
45------------------------
46
47A new Kconfig option CONFIG_EVENT_POWER_TRACING_DEPRECATED with the default value of
48'y' has been created. This allows the legacy trace power API to be used conjointly
49with the new trace API.
50The Kconfig option, the old trace API (in include/trace/events/power.h) and the
51old trace points will disappear in a future release (namely 2.6.41).
52
53power_start "type=%lu state=%lu cpu_id=%lu"
54power_frequency "type=%lu state=%lu cpu_id=%lu"
55power_end "cpu_id=%lu"
56
57The 'type' parameter takes one of those macros:
58 . POWER_NONE = 0,
59 . POWER_CSTATE = 1, /* C-State */
60 . POWER_PSTATE = 2, /* Fequency change or DVFS */
61
62The 'state' parameter is set depending on the type:
63 . Target C-state for type=POWER_CSTATE,
64 . Target frequency for type=POWER_PSTATE,
65
66power_end is used to indicate the exit of a state, corresponding to the latest
67power_start event.
68
692. Clocks events
70================
71The clock events are used for clock enable/disable and for
72clock rate change.
73
74clock_enable "%s state=%lu cpu_id=%lu"
75clock_disable "%s state=%lu cpu_id=%lu"
76clock_set_rate "%s state=%lu cpu_id=%lu"
77
78The first parameter gives the clock name (e.g. "gpio1_iclk").
79The second parameter is '1' for enable, '0' for disable, the target
80clock rate for set_rate.
81
823. Power domains events
83=======================
84The power domain events are used for power domains transitions
85
86power_domain_target "%s state=%lu cpu_id=%lu"
87
88The first parameter gives the power domain name (e.g. "mpu_pwrdm").
89The second parameter is the power domain target state.
90