PM / sleep: new suspend_resume trace event for console resume
authorTodd E Brandt <todd.e.brandt@linux.intel.com>
Fri, 19 Sep 2014 21:07:12 +0000 (14:07 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 22 Sep 2014 12:53:23 +0000 (14:53 +0200)
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>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/suspend.c

index 18c62195660f6c6c458d74346ee7979ec4388db4..e837dd6783c629c0645a81efa324d211c96b34c8 100644 (file)
@@ -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);