[Intel-gfx] [PATCH igt 03/24] lib: Enable automatic ftrace dumping for suspend failures
Chris Wilson
chris at chris-wilson.co.uk
Mon Aug 14 20:18:27 UTC 2017
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 at chris-wilson.co.uk>
---
lib/igt_aux.c | 15 +++++++++++----
1 file 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)
--
2.13.3
More information about the Intel-gfx
mailing list