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>2020-09-03 13:52:05 +0100
commit90a97fc98645313865ba8c80e6bd99486f170bb4 (patch)
tree5ce06c433cb1f48d198bcb549a3d2f302a2837fd
parentd01d3b563da26255743dd65d2f433822a0c035d8 (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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index fba34933..3dd1e042 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -59,6 +59,7 @@
#include "intel_chipset.h"
#include "igt_aux.h"
#include "igt_debugfs.h"
+#include "igt_ftrace.h"
#include "igt_gt.h"
#include "igt_params.h"
#include "igt_rand.h"
@@ -771,6 +772,8 @@ 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 = igt_system(cmd);
@@ -783,6 +786,8 @@ static void suspend_via_rtcwake(enum igt_suspend_state state)
"Check dmesg for further details.\n",
ret);
+ igt_ftrace_dump(__func__);
+
dir = open(igt_debugfs_mount(), O_RDONLY);
info = igt_sysfs_get(dir, path);
close(dir);
@@ -791,6 +796,7 @@ static void suspend_via_rtcwake(enum igt_suspend_state state)
free(info);
}
}
+ igt_ftrace_disable();
igt_assert_eq(ret, 0);
}