PM / Sleep: new trace event to print device suspend and resume times
authorShuah Khan <shuah.kh@samsung.com>
Fri, 26 Jul 2013 19:30:20 +0000 (13:30 -0600)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 27 Jul 2013 01:18:35 +0000 (03:18 +0200)
commit536446772f1181f3afdf332780b5325d1b6980c6
tree76b69430ab47c9f44869132b9a1794d6f37f56fa
parent3831261eb08557a1390b29c1038a0217232d8fdb
PM / Sleep: new trace event to print device suspend and resume times

A new trace event is added to PM events to print the time it takes to
suspend and resume a device.  It generates trace messages that
include device, driver, parent information in addition to the type of
PM ops invoked as well as the PM event and error status from the PM
ops. Example trace below:

bash-2239  [000] ....   290.883035: device_pm_report_time: backlight
 acpi_video0 parent=0000:00:02.0 state=freeze ops=class nsecs=332 err=0
bash-2239  [000] ....   290.883041: device_pm_report_time: rfkill rf
kill3 parent=phy0 state=freeze ops=legacy class nsecs=216 err=0
bash-2239  [001] ....   290.973892: device_pm_report_time: ieee80211
 phy0 parent=0000:01:00.0 state=freeze ops=legacy class nsecs=90846477 err=0

bash-2239  [001] ....   293.660129: device_pm_report_time: ieee80211 phy0 parent=0000:01:00.0 state=restore ops=legacy class nsecs=101295162 err=0
bash-2239  [001] ....   293.660147: device_pm_report_time: rfkill rfkill3 parent=phy0 state=restore ops=legacy class nsecs=1804 err=0
bash-2239  [001] ....   293.660157: device_pm_report_time: backlight acpi_video0 parent=0000:00:02.0 state=restore ops=class nsecs=757 err=0

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/main.c
include/trace/events/power.h