summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-08-08 11:33:14 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-08-11 12:00:15 +0100
commit9f3481f1d229670e5993ebaf86a8088609c9616e (patch)
treeacc953f0888ef1592c41cd540fd1ca3347f4b6b5
parentcb7179858fac08be6c2d98352febd1cbe903d793 (diff)
lib: Enable automatic ftrace dumping for suspend failures
Supplement dmesg with the function call graph to try and help identify why the suspend failed. On the other hand, it may be very noisy and perturb the system due to its overhead... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--lib/igt_aux.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index f428f159..8fa34411 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -56,6 +56,7 @@
#include "intel_chipset.h"
#include "igt_aux.h"
#include "igt_debugfs.h"
+#include "igt_ftrace.h"
#include "igt_gt.h"
#include "igt_rand.h"
#include "igt_sysfs.h"
@@ -762,13 +763,19 @@ static void suspend_via_rtcwake(enum igt_suspend_state state)
"the rtcwake tool or how your distro is set up.\n",
ret);
+ igt_ftrace_enable();
+
snprintf(cmd, sizeof(cmd), "rtcwake -s %d -m %s ",
delay, suspend_state_name[state]);
ret = system(cmd);
- igt_assert_f(ret == 0,
- "rtcwake failed with %i\n"
- "Check dmesg for further details.\n",
- ret);
+
+ igt_ftrace_disable();
+ if (ret) {
+ igt_warn("rtcwake failed with %i\n", ret);
+ igt_ftrace_dump(__func__);
+ igt_assert_f(ret == 0,
+ "Check dmesg for further details.\n");
+ }
}
static void suspend_via_sysfs(int power_dir, enum igt_suspend_state state)