diff options
author | Todd E Brandt <todd.e.brandt@linux.intel.com> | 2014-06-06 08:40:17 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-06 18:18:07 -0400 |
commit | bb3632c6101b2fad07e6246721466b984b1e0e9d (patch) | |
tree | 1f5755a94c7dfe2b2051411e0f08620b398a9059 /kernel/power/process.c | |
parent | 3eba148d75670f61463dd3c9ef8672da8f290f36 (diff) |
PM / sleep: trace events for suspend/resume
Adds trace events that give finer resolution into suspend/resume. These
events are graphed in the timelines generated by the analyze_suspend.py
script. They represent large areas of time consumed that are typical to
suspend and resume.
The event is triggered by calling the function "trace_suspend_resume"
with three arguments: a string (the name of the event to be displayed
in the timeline), an integer (case specific number, such as the power
state or cpu number), and a boolean (where true is used to denote the start
of the timeline event, and false to denote the end).
The suspend_resume trace event reproduces the data that the machine_suspend
trace event did, so the latter has been removed.
Signed-off-by: Todd Brandt <todd.e.brandt@intel.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power/process.c')
-rw-r--r-- | kernel/power/process.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c index 06ec8869dbf1..0ca8d83e2369 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
19 | #include <linux/kmod.h> | 19 | #include <linux/kmod.h> |
20 | #include <trace/events/power.h> | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * Timeout for stopping processes | 23 | * Timeout for stopping processes |
@@ -175,6 +176,7 @@ void thaw_processes(void) | |||
175 | struct task_struct *g, *p; | 176 | struct task_struct *g, *p; |
176 | struct task_struct *curr = current; | 177 | struct task_struct *curr = current; |
177 | 178 | ||
179 | trace_suspend_resume(TPS("thaw_processes"), 0, true); | ||
178 | if (pm_freezing) | 180 | if (pm_freezing) |
179 | atomic_dec(&system_freezing_cnt); | 181 | atomic_dec(&system_freezing_cnt); |
180 | pm_freezing = false; | 182 | pm_freezing = false; |
@@ -201,6 +203,7 @@ void thaw_processes(void) | |||
201 | 203 | ||
202 | schedule(); | 204 | schedule(); |
203 | printk("done.\n"); | 205 | printk("done.\n"); |
206 | trace_suspend_resume(TPS("thaw_processes"), 0, false); | ||
204 | } | 207 | } |
205 | 208 | ||
206 | void thaw_kernel_threads(void) | 209 | void thaw_kernel_threads(void) |