public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace
@ 2019-03-16  9:25 Chris Wilson
  2019-03-16  9:25 ` [igt-dev] [PATCH i-g-t 2/2] i915/pm_rpm: Enable ftrace logging Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Chris Wilson @ 2019-03-16  9:25 UTC (permalink / raw)
  To: igt-dev

If the kernel has tracing support builtin, we can enable around
troublesome tests to obtain greater detail from the kernel that may
prove invaluable in debugging the problem.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/Makefile.sources |   2 +
 lib/igt_core.c       |  28 ++----
 lib/igt_ftrace.c     | 204 +++++++++++++++++++++++++++++++++++++++++++
 lib/igt_ftrace.h     |  46 ++++++++++
 lib/meson.build      |   1 +
 5 files changed, 258 insertions(+), 23 deletions(-)
 create mode 100644 lib/igt_ftrace.c
 create mode 100644 lib/igt_ftrace.h

diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index cf2720981..24ee5f094 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -26,6 +26,8 @@ lib_source_list =	 	\
 	igt_color_encoding.c	\
 	igt_color_encoding.h	\
 	igt_edid_template.h	\
+	igt_ftrace.c		\
+	igt_ftrace.h		\
 	igt_gt.c		\
 	igt_gt.h		\
 	igt_gvt.c		\
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 6eb4798e2..3e69cf66c 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -62,6 +62,7 @@
 #include "intel_io.h"
 #include "igt_debugfs.h"
 #include "igt_dummyload.h"
+#include "igt_ftrace.h"
 #include "version.h"
 #include "config.h"
 
@@ -490,31 +491,11 @@ void __igt_fixture_end(void)
 	siglongjmp(igt_subtest_jmpbuf, 1);
 }
 
-/*
- * If the test takes out the machine, in addition to the usual dmesg
- * spam, the kernel may also emit a "death rattle" -- extra debug
- * information that is overkill for normal successful tests, but
- * vital for post-mortem analysis.
- */
-static void ftrace_dump_on_oops(bool enable)
-{
-	int fd;
-
-	fd = open("/proc/sys/kernel/ftrace_dump_on_oops", O_WRONLY);
-	if (fd < 0)
-		return;
-
-	/*
-	 * If we fail, we do not get the death rattle we wish, but we
-	 * still want to run the tests anyway.
-	 */
-	igt_ignore_warn(write(fd, enable ? "1\n" : "0\n", 2));
-	close(fd);
-}
-
 bool igt_exit_called;
 static void common_exit_handler(int sig)
 {
+	igt_ftrace_close();
+
 	if (!igt_only_list_subtests()) {
 		bind_fbcon(true);
 	}
@@ -812,7 +793,8 @@ out:
 
 		sync();
 		oom_adjust_for_doom();
-		ftrace_dump_on_oops(true);
+
+		igt_ftrace_open();
 	}
 
 	/* install exit handler, to ensure we clean up */
diff --git a/lib/igt_ftrace.c b/lib/igt_ftrace.c
new file mode 100644
index 000000000..428b35132
--- /dev/null
+++ b/lib/igt_ftrace.c
@@ -0,0 +1,204 @@
+/*
+ * Copyright © 2017 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "igt.h"
+#include "igt_ftrace.h"
+#include "igt_debugfs.h"
+#include "igt_sysfs.h"
+
+#define BIT(x) (1ul << (x))
+
+/* Only a single tracer in the kernel, so we can use a singleton */
+struct igt_ftrace {
+	int dir;
+
+	unsigned long flags;
+#define PID_SET BIT(0)
+#define INCLUDE_SET BIT(1)
+#define EXCLUDE_SET BIT(2)
+
+} igt_ftrace = { -1 };
+
+/*
+ * If the test takes out the machine, in addition to the usual dmesg
+ * spam, the kernel may also emit a "death rattle" -- extra debug
+ * information that is overkill for normal successful tests, but
+ * vital for post-mortem analysis.
+ */
+static void ftrace_dump_on_oops(bool enable)
+{
+	int fd;
+
+	fd = open("/proc/sys/kernel/ftrace_dump_on_oops", O_WRONLY);
+	if (fd < 0)
+		return;
+
+	/*
+	 * If we fail, we do not get the death rattle we wish, but we
+	 * still want to run the tests anyway.
+	 */
+	igt_ignore_warn(write(fd, enable ? "1\n" : "0\n", 2));
+	close(fd);
+}
+
+int igt_ftrace_open(void)
+{
+	int dir;
+	int err;
+
+	dir = open(igt_debugfs_mount(), O_RDONLY);
+	if (dir < 0)
+		return -errno;
+
+	igt_ftrace.dir = openat(dir, "tracing", O_RDONLY);
+	close(dir);
+	if (igt_ftrace.dir < 0)
+		return -errno;
+
+	err = igt_ftrace_disable();
+	if (err)
+		goto ft_close;
+
+	ftrace_dump_on_oops(true);
+	return 0;
+
+ft_close:
+	close(igt_ftrace.dir);
+	igt_ftrace.dir = -1;
+	return err;
+}
+
+int __igt_ftrace_enable(const char *mode,
+			const struct igt_ftrace_options *opts)
+{
+	int err;
+
+	if (igt_ftrace.dir < 0)
+		return -ENODEV;
+
+	if (!mode)
+		return -EINVAL;
+
+	err = igt_sysfs_set(igt_ftrace.dir, "current_tracer", mode);
+	if (err < 0)
+		return err;
+
+	if (opts && opts->pid) {
+		err = igt_sysfs_printf(igt_ftrace.dir,
+				       "set_ftrace_pid", "%d",
+				       opts->pid);
+		if (err < 0)
+			goto disable;
+
+		igt_ftrace.flags |= PID_SET;
+	}
+
+	if (opts && opts->include) {
+		err = igt_sysfs_set(igt_ftrace.dir,
+				    "set_ftrace_filter",
+				    opts->include);
+		if (err < 0)
+			goto disable;
+
+		igt_ftrace.flags |= INCLUDE_SET;
+	}
+
+	if (opts && opts->exclude) {
+		err = igt_sysfs_set(igt_ftrace.dir,
+				    "set_ftrace_notrace",
+				    opts->exclude);
+		if (err < 0)
+			goto disable;
+
+		igt_ftrace.flags |= EXCLUDE_SET;
+	}
+
+	err = igt_sysfs_set(igt_ftrace.dir, "tracer_on", "1");
+	if (err < 0)
+		return err;
+
+	return 0;
+
+disable:
+	igt_ftrace_disable();
+	return err;
+}
+
+int igt_ftrace_disable(void)
+{
+	int err;
+
+	if (igt_ftrace.dir < 0)
+		return -ENODEV;
+
+	err = igt_sysfs_set(igt_ftrace.dir, "tracer_on", "0");
+	if (err < 0)
+		return err;
+
+	if (igt_ftrace.flags & PID_SET) {
+		igt_sysfs_set(igt_ftrace.dir, "set_ftrace_pid", "");
+		igt_ftrace.flags &= ~PID_SET;
+	}
+
+	if (igt_ftrace.flags & INCLUDE_SET) {
+		igt_sysfs_set(igt_ftrace.dir, "set_ftrace_filter", "");
+		igt_ftrace.flags &= ~INCLUDE_SET;
+	}
+
+	if (igt_ftrace.flags & EXCLUDE_SET) {
+		igt_sysfs_set(igt_ftrace.dir, "set_ftrace_notrace", "");
+		igt_ftrace.flags &= ~EXCLUDE_SET;
+	}
+
+	return 0;
+}
+
+void igt_ftrace_dump(const char *header)
+{
+	char *txt;
+
+	if (igt_ftrace.dir < 0)
+		return;
+
+	txt = igt_sysfs_get(igt_ftrace.dir, "trace");
+	if (!txt)
+		return;
+
+	igt_info("%s:\n%s", header, txt);
+	free(txt);
+}
+
+void igt_ftrace_close(void)
+{
+	if (igt_ftrace.dir < 0)
+		return;
+
+	close(igt_ftrace.dir);
+	igt_ftrace.dir = -1;
+}
diff --git a/lib/igt_ftrace.h b/lib/igt_ftrace.h
new file mode 100644
index 000000000..3dd676829
--- /dev/null
+++ b/lib/igt_ftrace.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright © 2017 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#ifndef IGT_FTRACE_H
+#define IGT_FTRACE_H
+
+int igt_ftrace_open(void);
+
+struct igt_ftrace_options {
+	int pid;
+	const char *include;
+	const char *exclude;
+};
+
+int __igt_ftrace_enable(const char *mode,
+			const struct igt_ftrace_options *opts);
+#define igt_ftrace_enable() __igt_ftrace_enable("function_graph", NULL)
+
+int igt_ftrace_disable(void);
+
+void igt_ftrace_dump(const char *header);
+
+void igt_ftrace_close(void);
+
+#endif /* IGT_FTRACE_H */
diff --git a/lib/meson.build b/lib/meson.build
index 0eb5585d7..2f0f65a08 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -9,6 +9,7 @@ lib_sources = [
 	'igt_debugfs.c',
 	'igt_device.c',
 	'igt_aux.c',
+	'igt_ftrace.c',
 	'igt_gt.c',
 	'igt_gvt.c',
 	'igt_matrix.c',
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [igt-dev] [PATCH i-g-t 2/2] i915/pm_rpm: Enable ftrace logging
  2019-03-16  9:25 [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace Chris Wilson
@ 2019-03-16  9:25 ` Chris Wilson
  2019-03-18 11:12 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Add hooks for enabling ftrace (rev2) Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-03-16  9:25 UTC (permalink / raw)
  To: igt-dev

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/i915_pm_rpm.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index 759c76eaf..b5e5f63ca 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -46,6 +46,7 @@
 #include <drm.h>
 
 #include "igt.h"
+#include "igt_ftrace.h"
 #include "igt_kmod.h"
 #include "igt_sysfs.h"
 #include "igt_debugfs.h"
@@ -1975,8 +1976,10 @@ int main(int argc, char *argv[])
 	/* Skip instead of failing in case the machine is not prepared to reach
 	 * PC8+. We don't want bug reports from cases where the machine is just
 	 * not properly configured. */
-	igt_fixture
+	igt_fixture {
+		igt_ftrace_enable();
 		igt_require(setup_environment());
+	}
 
 	if (stay)
 		igt_subtest("stay")
@@ -2118,5 +2121,9 @@ int main(int argc, char *argv[])
 		igt_i915_driver_unload();
 	}
 
+	igt_fixture {
+		igt_ftrace_disable();
+	}
+
 	igt_exit();
 }
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Add hooks for enabling ftrace (rev2)
  2019-03-16  9:25 [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace Chris Wilson
  2019-03-16  9:25 ` [igt-dev] [PATCH i-g-t 2/2] i915/pm_rpm: Enable ftrace logging Chris Wilson
@ 2019-03-18 11:12 ` Patchwork
  2019-03-18 14:02 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2019-03-19  4:26 ` [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace Ashutosh Dixit
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-03-18 11:12 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] lib: Add hooks for enabling ftrace (rev2)
URL   : https://patchwork.freedesktop.org/series/58087/
State : success

== Summary ==

CI Bug Log - changes from IGT_4888 -> IGTPW_2646
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58087/revisions/2/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_2646:

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@gem_exec_gttfill@basic:
    - {fi-icl-y}:         PASS -> DMESG-WARN

  
Known issues
------------

  Here are the changes found in IGTPW_2646 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_cs_nop@sync-gfx0:
    - fi-kbl-7567u:       NOTRUN -> SKIP [fdo#109271] +17

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-icl-u3:          PASS -> DMESG-WARN [fdo#109638]

  * igt@i915_module_load@reload:
    - fi-kbl-7567u:       PASS -> DMESG-WARN [fdo#105602] / [fdo#108529]

  * igt@i915_pm_rpm@module-reload:
    - fi-kbl-7567u:       NOTRUN -> DMESG-WARN [fdo#108529]

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         PASS -> INCOMPLETE [fdo#103927] / [fdo#109720]

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-7567u:       PASS -> DMESG-FAIL [fdo#105079]

  * igt@kms_chamelium@dp-edid-read:
    - fi-skl-iommu:       NOTRUN -> SKIP [fdo#109271] +45

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362]

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
    - fi-byt-clapper:     PASS -> FAIL [fdo#107362]

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c:
    - fi-kbl-7567u:       PASS -> SKIP [fdo#109271] +33

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-whl-u:           PASS -> FAIL [fdo#103375] +3

  * igt@prime_vgem@basic-fence-flip:
    - fi-gdg-551:         PASS -> FAIL [fdo#103182] +1

  * igt@runner@aborted:
    - fi-apl-guc:         NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

  
#### Possible fixes ####

  * igt@kms_pipe_crc_basic@read-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#107362] -> PASS

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS +2

  * igt@prime_vgem@basic-fence-flip:
    - fi-ilk-650:         FAIL [fdo#104008] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
  [fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#108529]: https://bugs.freedesktop.org/show_bug.cgi?id=108529
  [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109638]: https://bugs.freedesktop.org/show_bug.cgi?id=109638
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720


Participating hosts (46 -> 40)
------------------------------

  Additional (1): fi-skl-iommu 
  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-bdw-samus 


Build changes
-------------

    * IGT: IGT_4888 -> IGTPW_2646
    * Linux: CI_DRM_5756 -> CI_DRM_5763

  CI_DRM_5756: 0a2a982693ac3f3ecabf8e6c12cb18aa993ae3b0 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_5763: de2772b353b83e6347687973dfff6f7f5257e364 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2646: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2646/
  IGT_4888: 71ad19eb8fe4f0eecae3bf063e107293b90b9abc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2646/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] lib: Add hooks for enabling ftrace (rev2)
  2019-03-16  9:25 [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace Chris Wilson
  2019-03-16  9:25 ` [igt-dev] [PATCH i-g-t 2/2] i915/pm_rpm: Enable ftrace logging Chris Wilson
  2019-03-18 11:12 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Add hooks for enabling ftrace (rev2) Patchwork
@ 2019-03-18 14:02 ` Patchwork
  2019-03-19  4:26 ` [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace Ashutosh Dixit
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-03-18 14:02 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] lib: Add hooks for enabling ftrace (rev2)
URL   : https://patchwork.freedesktop.org/series/58087/
State : success

== Summary ==

CI Bug Log - changes from IGT_4888_full -> IGTPW_2646_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58087/revisions/2/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2646_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_atomic_transition@3x-modeset-transitions-nonblocking:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +9

  * igt@kms_atomic_transition@4x-modeset-transitions-nonblocking-fencing:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_busy@extended-modeset-hang-newfb-render-c:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#107956] +1

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
    - shard-hsw:          PASS -> DMESG-WARN [fdo#107956] +1

  * igt@kms_color@pipe-b-ctm-max:
    - shard-apl:          PASS -> FAIL [fdo#108147]

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232] +1

  * igt@kms_cursor_crc@cursor-256x256-onscreen:
    - shard-kbl:          PASS -> FAIL [fdo#103232] +1

  * igt@kms_cursor_crc@cursor-64x21-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +7

  * igt@kms_cursor_crc@cursor-alpha-opaque:
    - shard-apl:          PASS -> FAIL [fdo#109350]
    - shard-glk:          PASS -> FAIL [fdo#109350]

  * igt@kms_cursor_crc@cursor-size-change:
    - shard-glk:          PASS -> FAIL [fdo#103232]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-apl:          PASS -> FAIL [fdo#103167] +1

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
    - shard-glk:          PASS -> FAIL [fdo#103167] +5

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +96

  * igt@kms_psr@sprite_plane_onoff:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +11

  * igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
    - shard-kbl:          PASS -> DMESG-FAIL [fdo#105763]

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          PASS -> FAIL [fdo#109016]

  * igt@kms_rotation_crc@primary-x-tiled-reflect-x-180:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +3

  * igt@kms_setmode@basic:
    - shard-hsw:          PASS -> FAIL [fdo#99912]

  * igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +6

  * igt@testdisplay:
    - shard-kbl:          PASS -> INCOMPLETE [fdo#103665]
    - shard-apl:          PASS -> INCOMPLETE [fdo#103927]

  
#### Possible fixes ####

  * igt@gem_eio@reset-stress:
    - shard-snb:          FAIL [fdo#109661] -> PASS

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-kbl:          DMESG-WARN [fdo#107956] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-onscreen:
    - shard-apl:          FAIL [fdo#103232] -> PASS +1

  * igt@kms_cursor_crc@cursor-64x64-suspend:
    - shard-kbl:          FAIL [fdo#103191] / [fdo#103232] -> PASS

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
    - shard-hsw:          FAIL [fdo#105767] -> PASS

  * igt@kms_flip@modeset-vs-vblank-race-interruptible:
    - shard-glk:          FAIL [fdo#103060] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-apl:          FAIL [fdo#103167] -> PASS +2

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
    - shard-kbl:          FAIL [fdo#103167] -> PASS +1

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
    - shard-glk:          FAIL [fdo#103167] -> PASS +3

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * {igt@kms_plane@pixel-format-pipe-a-planes-source-clamping}:
    - shard-apl:          FAIL [fdo#110033] -> PASS
    - shard-kbl:          FAIL [fdo#110127] -> PASS

  * {igt@kms_plane_multiple@atomic-pipe-b-tiling-y}:
    - shard-apl:          FAIL [fdo#110037] -> PASS +2

  * {igt@kms_plane_multiple@atomic-pipe-c-tiling-y}:
    - shard-glk:          FAIL [fdo#110037] -> PASS

  * igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping:
    - shard-glk:          SKIP [fdo#109271] / [fdo#109278] -> PASS

  * igt@kms_setmode@basic:
    - shard-apl:          FAIL [fdo#99912] -> PASS

  * igt@kms_vblank@pipe-c-ts-continuation-modeset:
    - shard-kbl:          FAIL [fdo#104894] -> PASS
    - shard-apl:          FAIL [fdo#104894] -> PASS

  
#### Warnings ####

  * igt@kms_plane_scaling@pipe-a-scaler-with-rotation:
    - shard-glk:          FAIL [fdo#110098] -> SKIP [fdo#109271] / [fdo#109278] +1

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
  [fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
  [fdo#110033]: https://bugs.freedesktop.org/show_bug.cgi?id=110033
  [fdo#110037]: https://bugs.freedesktop.org/show_bug.cgi?id=110037
  [fdo#110038]: https://bugs.freedesktop.org/show_bug.cgi?id=110038
  [fdo#110098]: https://bugs.freedesktop.org/show_bug.cgi?id=110098
  [fdo#110127]: https://bugs.freedesktop.org/show_bug.cgi?id=110127
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * IGT: IGT_4888 -> IGTPW_2646
    * Linux: CI_DRM_5756 -> CI_DRM_5763

  CI_DRM_5756: 0a2a982693ac3f3ecabf8e6c12cb18aa993ae3b0 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_5763: de2772b353b83e6347687973dfff6f7f5257e364 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2646: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2646/
  IGT_4888: 71ad19eb8fe4f0eecae3bf063e107293b90b9abc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2646/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace
  2019-03-16  9:25 [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace Chris Wilson
                   ` (2 preceding siblings ...)
  2019-03-18 14:02 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-03-19  4:26 ` Ashutosh Dixit
  2019-03-19  9:06   ` Chris Wilson
  3 siblings, 1 reply; 6+ messages in thread
From: Ashutosh Dixit @ 2019-03-19  4:26 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Sat, 16 Mar 2019 02:25:04 -0700, Chris Wilson wrote:
>
> If the kernel has tracing support builtin, we can enable around
> troublesome tests to obtain greater detail from the kernel that may
> prove invaluable in debugging the problem.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

I have a few general comments on the patch. I have submitted a patch [1]
which has some overlap with the functionality enabled here so I am thinking
if it is possible to combine the best parts of both the patches. I am aware
that coming up with a general hard-coded solution for these sort of traces
is difficult.

a. Is the function graph tracer the most useful tracer to use as is done in
   this patch? Or a nop tracer, or it doesn't matter?
b. Do we need to increase the size of the ftrace ring to reduce the
   likelihood of the ftrace ring overflow?
c. This patch dumps out the ftrace buffer when there is a kernel
   oops. However, afaik, the audio issues we are seeing result in test
   failures but there are no oops.
d. Even when there is an oops, ftrace output from this patch will contain
   the output from all previous sub-tests, not just the sub-test which
   caused the oops. I had tried to take care of c. and d. in my patch.

Thanks!

[1] https://patchwork.freedesktop.org/patch/292574/

> ---
>  lib/Makefile.sources |   2 +
>  lib/igt_core.c       |  28 ++----
>  lib/igt_ftrace.c     | 204 +++++++++++++++++++++++++++++++++++++++++++
>  lib/igt_ftrace.h     |  46 ++++++++++
>  lib/meson.build      |   1 +
>  5 files changed, 258 insertions(+), 23 deletions(-)
>  create mode 100644 lib/igt_ftrace.c
>  create mode 100644 lib/igt_ftrace.h
>
> diff --git a/lib/Makefile.sources b/lib/Makefile.sources
> index cf2720981..24ee5f094 100644
> --- a/lib/Makefile.sources
> +++ b/lib/Makefile.sources
> @@ -26,6 +26,8 @@ lib_source_list =		\
>	igt_color_encoding.c	\
>	igt_color_encoding.h	\
>	igt_edid_template.h	\
> +	igt_ftrace.c		\
> +	igt_ftrace.h		\
>	igt_gt.c		\
>	igt_gt.h		\
>	igt_gvt.c		\
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 6eb4798e2..3e69cf66c 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -62,6 +62,7 @@
>  #include "intel_io.h"
>  #include "igt_debugfs.h"
>  #include "igt_dummyload.h"
> +#include "igt_ftrace.h"
>  #include "version.h"
>  #include "config.h"
>
> @@ -490,31 +491,11 @@ void __igt_fixture_end(void)
>	siglongjmp(igt_subtest_jmpbuf, 1);
>  }
>
> -/*
> - * If the test takes out the machine, in addition to the usual dmesg
> - * spam, the kernel may also emit a "death rattle" -- extra debug
> - * information that is overkill for normal successful tests, but
> - * vital for post-mortem analysis.
> - */
> -static void ftrace_dump_on_oops(bool enable)
> -{
> -	int fd;
> -
> -	fd = open("/proc/sys/kernel/ftrace_dump_on_oops", O_WRONLY);
> -	if (fd < 0)
> -		return;
> -
> -	/*
> -	 * If we fail, we do not get the death rattle we wish, but we
> -	 * still want to run the tests anyway.
> -	 */
> -	igt_ignore_warn(write(fd, enable ? "1\n" : "0\n", 2));
> -	close(fd);
> -}
> -
>  bool igt_exit_called;
>  static void common_exit_handler(int sig)
>  {
> +	igt_ftrace_close();
> +
>	if (!igt_only_list_subtests()) {
>		bind_fbcon(true);
>	}
> @@ -812,7 +793,8 @@ out:
>
>		sync();
>		oom_adjust_for_doom();
> -		ftrace_dump_on_oops(true);
> +
> +		igt_ftrace_open();
>	}
>
>	/* install exit handler, to ensure we clean up */
> diff --git a/lib/igt_ftrace.c b/lib/igt_ftrace.c
> new file mode 100644
> index 000000000..428b35132
> --- /dev/null
> +++ b/lib/igt_ftrace.c
> @@ -0,0 +1,204 @@
> +/*
> + * Copyright © 2017 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + */
> +
> +#include <errno.h>
> +#include <fcntl.h>
> +#include <string.h>
> +#include <unistd.h>
> +
> +#include "igt.h"
> +#include "igt_ftrace.h"
> +#include "igt_debugfs.h"
> +#include "igt_sysfs.h"
> +
> +#define BIT(x) (1ul << (x))
> +
> +/* Only a single tracer in the kernel, so we can use a singleton */
> +struct igt_ftrace {
> +	int dir;
> +
> +	unsigned long flags;
> +#define PID_SET BIT(0)
> +#define INCLUDE_SET BIT(1)
> +#define EXCLUDE_SET BIT(2)
> +
> +} igt_ftrace = { -1 };
> +
> +/*
> + * If the test takes out the machine, in addition to the usual dmesg
> + * spam, the kernel may also emit a "death rattle" -- extra debug
> + * information that is overkill for normal successful tests, but
> + * vital for post-mortem analysis.
> + */
> +static void ftrace_dump_on_oops(bool enable)
> +{
> +	int fd;
> +
> +	fd = open("/proc/sys/kernel/ftrace_dump_on_oops", O_WRONLY);
> +	if (fd < 0)
> +		return;
> +
> +	/*
> +	 * If we fail, we do not get the death rattle we wish, but we
> +	 * still want to run the tests anyway.
> +	 */
> +	igt_ignore_warn(write(fd, enable ? "1\n" : "0\n", 2));
> +	close(fd);
> +}
> +
> +int igt_ftrace_open(void)
> +{
> +	int dir;
> +	int err;
> +
> +	dir = open(igt_debugfs_mount(), O_RDONLY);
> +	if (dir < 0)
> +		return -errno;
> +
> +	igt_ftrace.dir = openat(dir, "tracing", O_RDONLY);
> +	close(dir);
> +	if (igt_ftrace.dir < 0)
> +		return -errno;
> +
> +	err = igt_ftrace_disable();
> +	if (err)
> +		goto ft_close;
> +
> +	ftrace_dump_on_oops(true);
> +	return 0;
> +
> +ft_close:
> +	close(igt_ftrace.dir);
> +	igt_ftrace.dir = -1;
> +	return err;
> +}
> +
> +int __igt_ftrace_enable(const char *mode,
> +			const struct igt_ftrace_options *opts)
> +{
> +	int err;
> +
> +	if (igt_ftrace.dir < 0)
> +		return -ENODEV;
> +
> +	if (!mode)
> +		return -EINVAL;
> +
> +	err = igt_sysfs_set(igt_ftrace.dir, "current_tracer", mode);
> +	if (err < 0)
> +		return err;
> +
> +	if (opts && opts->pid) {
> +		err = igt_sysfs_printf(igt_ftrace.dir,
> +				       "set_ftrace_pid", "%d",
> +				       opts->pid);
> +		if (err < 0)
> +			goto disable;
> +
> +		igt_ftrace.flags |= PID_SET;
> +	}
> +
> +	if (opts && opts->include) {
> +		err = igt_sysfs_set(igt_ftrace.dir,
> +				    "set_ftrace_filter",
> +				    opts->include);
> +		if (err < 0)
> +			goto disable;
> +
> +		igt_ftrace.flags |= INCLUDE_SET;
> +	}
> +
> +	if (opts && opts->exclude) {
> +		err = igt_sysfs_set(igt_ftrace.dir,
> +				    "set_ftrace_notrace",
> +				    opts->exclude);
> +		if (err < 0)
> +			goto disable;
> +
> +		igt_ftrace.flags |= EXCLUDE_SET;
> +	}
> +
> +	err = igt_sysfs_set(igt_ftrace.dir, "tracer_on", "1");
> +	if (err < 0)
> +		return err;
> +
> +	return 0;
> +
> +disable:
> +	igt_ftrace_disable();
> +	return err;
> +}
> +
> +int igt_ftrace_disable(void)
> +{
> +	int err;
> +
> +	if (igt_ftrace.dir < 0)
> +		return -ENODEV;
> +
> +	err = igt_sysfs_set(igt_ftrace.dir, "tracer_on", "0");
> +	if (err < 0)
> +		return err;
> +
> +	if (igt_ftrace.flags & PID_SET) {
> +		igt_sysfs_set(igt_ftrace.dir, "set_ftrace_pid", "");
> +		igt_ftrace.flags &= ~PID_SET;
> +	}
> +
> +	if (igt_ftrace.flags & INCLUDE_SET) {
> +		igt_sysfs_set(igt_ftrace.dir, "set_ftrace_filter", "");
> +		igt_ftrace.flags &= ~INCLUDE_SET;
> +	}
> +
> +	if (igt_ftrace.flags & EXCLUDE_SET) {
> +		igt_sysfs_set(igt_ftrace.dir, "set_ftrace_notrace", "");
> +		igt_ftrace.flags &= ~EXCLUDE_SET;
> +	}
> +
> +	return 0;
> +}
> +
> +void igt_ftrace_dump(const char *header)
> +{
> +	char *txt;
> +
> +	if (igt_ftrace.dir < 0)
> +		return;
> +
> +	txt = igt_sysfs_get(igt_ftrace.dir, "trace");
> +	if (!txt)
> +		return;
> +
> +	igt_info("%s:\n%s", header, txt);
> +	free(txt);
> +}
> +
> +void igt_ftrace_close(void)
> +{
> +	if (igt_ftrace.dir < 0)
> +		return;
> +
> +	close(igt_ftrace.dir);
> +	igt_ftrace.dir = -1;
> +}
> diff --git a/lib/igt_ftrace.h b/lib/igt_ftrace.h
> new file mode 100644
> index 000000000..3dd676829
> --- /dev/null
> +++ b/lib/igt_ftrace.h
> @@ -0,0 +1,46 @@
> +/*
> + * Copyright © 2017 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef IGT_FTRACE_H
> +#define IGT_FTRACE_H
> +
> +int igt_ftrace_open(void);
> +
> +struct igt_ftrace_options {
> +	int pid;
> +	const char *include;
> +	const char *exclude;
> +};
> +
> +int __igt_ftrace_enable(const char *mode,
> +			const struct igt_ftrace_options *opts);
> +#define igt_ftrace_enable() __igt_ftrace_enable("function_graph", NULL)
> +
> +int igt_ftrace_disable(void);
> +
> +void igt_ftrace_dump(const char *header);
> +
> +void igt_ftrace_close(void);
> +
> +#endif /* IGT_FTRACE_H */
> diff --git a/lib/meson.build b/lib/meson.build
> index 0eb5585d7..2f0f65a08 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -9,6 +9,7 @@ lib_sources = [
>	'igt_debugfs.c',
>	'igt_device.c',
>	'igt_aux.c',
> +	'igt_ftrace.c',
>	'igt_gt.c',
>	'igt_gvt.c',
>	'igt_matrix.c',
> --
> 2.20.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace
  2019-03-19  4:26 ` [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace Ashutosh Dixit
@ 2019-03-19  9:06   ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-03-19  9:06 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: igt-dev

Quoting Ashutosh Dixit (2019-03-19 04:26:51)
> On Sat, 16 Mar 2019 02:25:04 -0700, Chris Wilson wrote:
> >
> > If the kernel has tracing support builtin, we can enable around
> > troublesome tests to obtain greater detail from the kernel that may
> > prove invaluable in debugging the problem.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> I have a few general comments on the patch. I have submitted a patch [1]
> which has some overlap with the functionality enabled here so I am thinking
> if it is possible to combine the best parts of both the patches.

Hence why I dug up this patch from a couple of years ago and sent it in
your direction...

> I am aware
> that coming up with a general hard-coded solution for these sort of traces
> is difficult.
> 
> a. Is the function graph tracer the most useful tracer to use as is done in
>    this patch? Or a nop tracer, or it doesn't matter?

Depends on situation. I want to work more with the latency-tracer and
irqsoff-tracer.

> b. Do we need to increase the size of the ftrace ring to reduce the
>    likelihood of the ftrace ring overflow?

Unlikely, if you overflow the ftrace you are dumping too much irrelevant
noise an you will never find the bug anyway. If the test isn't designed
to catch and stop on the bug, you will be hard pressed to find it.

> c. This patch dumps out the ftrace buffer when there is a kernel
>    oops. However, afaik, the audio issues we are seeing result in test
>    failures but there are no oops.

There is a function to grab the ftrace log, deciding when to call that I
left as an exercise for the reader. I generally just read it via
netconsole anyway.

> d. Even when there is an oops, ftrace output from this patch will contain
>    the output from all previous sub-tests, not just the sub-test which
>    caused the oops. I had tried to take care of c. and d. in my patch.

Sure, as is normally the case. A big, big reason why I keep pushing for
kmsg capture to be integral to igt.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-03-19  9:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-16  9:25 [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace Chris Wilson
2019-03-16  9:25 ` [igt-dev] [PATCH i-g-t 2/2] i915/pm_rpm: Enable ftrace logging Chris Wilson
2019-03-18 11:12 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: Add hooks for enabling ftrace (rev2) Patchwork
2019-03-18 14:02 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-19  4:26 ` [igt-dev] [PATCH i-g-t 1/2] lib: Add hooks for enabling ftrace Ashutosh Dixit
2019-03-19  9:06   ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox