diff mbox

new suspend_resume trace event for console resume

Message ID 20140919210711.GA15652@linux.intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Todd Brandt Sept. 19, 2014, 9:07 p.m. UTC
This patch adds another suspend_resume trace event for analyze_suspend
to capture. The resume_console call can take several hundred milliseconds
if the printk buffer is full of debug info. The tool will now inform 
testers of the wasted time and encourage them to disable it in
production builds.

Signed-off-by: Todd Brandt <todd.e.brandt@intel.com>
----
 kernel/power/suspend.c | 2 ++
 1 file changed, 2 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rafael J. Wysocki Sept. 22, 2014, 2:04 p.m. UTC | #1
On Friday, September 19, 2014 02:07:12 PM Todd E Brandt wrote:
> This patch adds another suspend_resume trace event for analyze_suspend
> to capture. The resume_console call can take several hundred milliseconds
> if the printk buffer is full of debug info. The tool will now inform 
> testers of the wasted time and encourage them to disable it in
> production builds.
> 
> Signed-off-by: Todd Brandt <todd.e.brandt@intel.com>

Queued up for 3.18, thanks!

> ----
>  kernel/power/suspend.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
> index 18c6219..e837dd6 100644
> --- a/kernel/power/suspend.c
> +++ b/kernel/power/suspend.c
> @@ -361,7 +361,9 @@ int suspend_devices_and_enter(suspend_state_t state)
>  	suspend_test_start();
>  	dpm_resume_end(PMSG_RESUME);
>  	suspend_test_finish("resume devices");
> +	trace_suspend_resume(TPS("resume_console"), state, true);
>  	resume_console();
> +	trace_suspend_resume(TPS("resume_console"), state, false);
>  
>   Close:
>  	platform_suspend_end(state);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 18c6219..e837dd6 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -361,7 +361,9 @@  int suspend_devices_and_enter(suspend_state_t state)
 	suspend_test_start();
 	dpm_resume_end(PMSG_RESUME);
 	suspend_test_finish("resume devices");
+	trace_suspend_resume(TPS("resume_console"), state, true);
 	resume_console();
+	trace_suspend_resume(TPS("resume_console"), state, false);
 
  Close:
 	platform_suspend_end(state);