[igt-dev] [PATCH i-g-t] igt: Stop requesting ftrace dumps on oops by default

Chris Wilson chris at chris-wilson.co.uk
Fri Nov 15 15:26:45 UTC 2019


They have lived past their usefulness as now we frequently lose vital
debug information because we are spamming unrelated GEM traces. We can
add the spam directly to GEM_BUG_ON(), and enable it ourselves if we
truly need the trace-on-oops.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Martin Peres <martin.peres at linux.intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela at intel.com>
---
 lib/igt_core.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 86ce8af9c..206f3351b 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -270,6 +270,7 @@ static clockid_t igt_clock = (clockid_t)-1;
 static bool in_fixture = false;
 static bool test_with_subtests = false;
 static bool in_atexit_handler = false;
+static bool show_ftrace = false;
 static enum {
 	CONT = 0, SKIP, FAIL
 } skip_subtests_henceforth = CONT;
@@ -304,6 +305,7 @@ enum {
 	OPT_DEBUG,
 	OPT_INTERACTIVE_DEBUG,
 	OPT_SKIP_CRC,
+	OPT_TRACE_OOPS,
 	OPT_HELP = 'h'
 };
 
@@ -785,6 +787,7 @@ static int common_init(int *argc, char **argv,
 		{"debug",             optional_argument, NULL, OPT_DEBUG},
 		{"interactive-debug", optional_argument, NULL, OPT_INTERACTIVE_DEBUG},
 		{"skip-crc-compare",  no_argument,       NULL, OPT_SKIP_CRC},
+		{"trace-on-oops",     no_argument,       NULL, OPT_TRACE_OOPS},
 		{"help",              no_argument,       NULL, OPT_HELP},
 		{0, 0, 0, 0}
 	};
@@ -907,6 +910,9 @@ static int common_init(int *argc, char **argv,
 		case OPT_SKIP_CRC:
 			igt_skip_crc_compare = true;
 			goto out;
+		case OPT_TRACE_OOPS:
+			show_ftrace = true;
+			goto out;
 		case OPT_HELP:
 			print_usage(help_str, false);
 			ret = -1;
@@ -950,7 +956,7 @@ out:
 
 		sync();
 		oom_adjust_for_doom();
-		ftrace_dump_on_oops(true);
+		ftrace_dump_on_oops(show_ftrace);
 	}
 
 	/* install exit handler, to ensure we clean up */
-- 
2.24.0



More information about the igt-dev mailing list