From 6740a97a60bc90de4794a8c38aa05c39d4638612 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 31 May 2021 15:04:11 +0300 Subject: [PATCH 1/3] debugability: logger: Add note for etrace and trace debugfs files Add a note section with brief information about the etrace and trace debugfs files. Signed-off-by: Peter Ujfalusi --- developer_guides/debugability/logger/index.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/developer_guides/debugability/logger/index.rst b/developer_guides/debugability/logger/index.rst index aadd2608..692fd104 100644 --- a/developer_guides/debugability/logger/index.rst +++ b/developer_guides/debugability/logger/index.rst @@ -128,6 +128,14 @@ Examples sof-logger -l ldc_file -d +.. note:: + debugfs files used by ``sof-logger`` + + - ``etrace``: direct access to the shared TRACE window of the SOF firmware + - ``trace``: using DMA to stream debug trace information from SOF firmware (on + distribution kernels ``sof_debug=1`` module option for ``snd_sof`` might be + needed if the /sys/kernel/debug/sof/trace file is not present) + Trace filtering *************** From 664da17e754bf3823a36dfe2bbc6e850c461cc7b Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 31 May 2021 15:06:00 +0300 Subject: [PATCH 2/3] intel_debug: Add link to dynamic debug documentation of the Linux kernel To avoid confusion, add link to the kernel documentation about the dynamic debug feature used by the Linux kernel. Signed-off-by: Peter Ujfalusi --- getting_started/intel_debug/suggestions.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/getting_started/intel_debug/suggestions.rst b/getting_started/intel_debug/suggestions.rst index 7e74a1c2..1b163674 100644 --- a/getting_started/intel_debug/suggestions.rst +++ b/getting_started/intel_debug/suggestions.rst @@ -117,6 +117,9 @@ file: Note that this list is only an example. +Dynamic debug is a Linux kernel feature. For detailed information, see the +official `kernel documentation `__. + Install sof-logger ****************** From b44a2e5ca05e87904caf68a5780f5f0f67391d04 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 31 May 2021 15:07:52 +0300 Subject: [PATCH 3/3] intel_debug: Add instruction to enable the trace debugfs Distribution kernels ship with trace not enabled by default. Add instruction on how to enable the file in order to provide traces. Signed-off-by: Peter Ujfalusi --- getting_started/intel_debug/suggestions.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/getting_started/intel_debug/suggestions.rst b/getting_started/intel_debug/suggestions.rst index 1b163674..9b9c9b3c 100644 --- a/getting_started/intel_debug/suggestions.rst +++ b/getting_started/intel_debug/suggestions.rst @@ -131,4 +131,12 @@ following command to extract DSP traces: .. code-block:: bash - sof-logger -t sof-tgl.ldc \ No newline at end of file + sof-logger -t -l sof-tgl.ldc + +Trace support might need to be enabled on distribution kernels in case the +``/sys/kernel/debug/sof/trace`` file is not present by adding sof_debug=1 option +to snd_sof module: + +.. code-block:: + + options snd_sof sof_debug=1