diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-08-08 11:33:14 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-03-15 10:52:37 +0000 |
commit | fbea9debaef0c919b4210f764675f59fda133359 (patch) | |
tree | 14801208db767e6d5f8a7b226ffb47f1cacb613d | |
parent | 48b47894383efde31dd9b0781f4886855bd88439 (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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c index ee0e6abb..64b95296 100644 --- a/lib/igt_aux.c +++ b/lib/igt_aux.c @@ -57,6 +57,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" @@ -802,6 +803,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); @@ -814,6 +817,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); @@ -822,6 +827,7 @@ static void suspend_via_rtcwake(enum igt_suspend_state state) free(info); } } + igt_ftrace_disable(); igt_assert_eq(ret, 0); } |