[PATCH 1/3] perf: add calls to suspend trace point

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: jean.pihet
Date: Tuesday, January 4, 2011 - 3:48 am

From: Jean Pihet <j-pihet@ti.com>

Uses the machine_suspend trace point, called from the
generic kernel suspend_enter function.

Signed-off-by: Jean Pihet <j-pihet@ti.com>
CC: Thomas Renninger <trenn@suse.de>
---
 kernel/power/suspend.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index ecf7705..0650596 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -22,6 +22,7 @@
 #include <linux/mm.h>
 #include <linux/slab.h>
 #include <linux/suspend.h>
+#include <trace/events/power.h>
 
 #include "power.h"
 
@@ -164,7 +165,9 @@ static int suspend_enter(suspend_state_t state)
 	error = sysdev_suspend(PMSG_SUSPEND);
 	if (!error) {
 		if (!suspend_test(TEST_CORE) && pm_check_wakeup_events()) {
+			trace_machine_suspend(state);
 			error = suspend_ops->enter(state);
+			trace_machine_suspend(PWR_EVENT_EXIT);
 			events_check_enabled = false;
 		}
 		sysdev_resume();
-- 
1.7.2.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/3] perf, tools: new power trace API, jean.pihet, (Tue Jan 4, 3:17 am)
[PATCH 1/3] perf: add calls to suspend trace point, jean.pihet, (Tue Jan 4, 3:17 am)
[PATCH 1/3] perf: add calls to suspend trace point, jean.pihet, (Tue Jan 4, 3:48 am)
Re: [PATCH 1/3] perf: add calls to suspend trace point, Pavel Machek, (Tue Jan 4, 4:29 am)
Re: [PATCH 1/3] perf: add calls to suspend trace point, Rafael J. Wysocki, (Tue Jan 4, 4:01 pm)