Skip to content

Commit 9da4405

Browse files
eurofunlgirdwood
authored andcommitted
logger: restructure for better readability
Moved trace filtering details to a dedicated section and rephrased third sub-point. Own section for 'power gating' notes plus re-wording of first two sentences. Signed-off-by: Alexander Boehm <[email protected]>
1 parent e79c6f1 commit 9da4405

File tree

1 file changed

+31
-24
lines changed
  • developer_guides/debugability/logger

1 file changed

+31
-24
lines changed

developer_guides/debugability/logger/index.rst

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Examples
129129
130130
131131
.. note::
132-
debugfs files used by ``sof-logger``
132+
debugfs files used by sof-logger:
133133

134134
- ``etrace``: direct access to the shared TRACE window of the SOF firmware
135135
- ``trace``: using DMA to stream debug trace information from SOF firmware (on
@@ -214,12 +214,17 @@ A similar example may be prepared for components on a particular pipeline:
214214

215215
sof-logger -l ldc_file -t -Fc=* -Fv=*1.*
216216

217-
.. note::
218-
To track a verbose message, select the "Trace verbose" option under the "Trace" menu from the firmware build.
217+
Verbose and debug log levels
218+
----------------------------
219+
220+
To enable verbose and debug trace messages, select the "Trace->Trace verbose" option in the firmware build
221+
menuconfig (in addition to setting the proper log levels as described above).
219222

220-
Active trace filters are stored in the firmware runtime memory, so after a firmware restart (such as after power gating
221-
in sleep mode) filters settings will be reset.
223+
Disabling DSP power gating
224+
--------------------------
222225

226+
After a firmware reset (such as after power gating in suspend mode) custom filter settings will be lost.
227+
Thus consider disabling power gating during your debug session. The way this is done is slightly different on every platform,
223228
Consider disabling power gating during your debug session by entering the following:
224229

225230
.. code:: bash
@@ -234,29 +239,31 @@ Consider disabling power gating during your debug session by entering the follow
234239
235240
cat /sys/devices/pci0000\:00/0000\:$(lspci -nn | grep "audio controller" | awk '{print $1;}')/power/runtime_status
236241
237-
The logger trace filtering affects only traces sent after the filter setup,
238-
so traces already stored on the kernel side are not affected.
239242
240-
Filters are set up incrementally, so when loggers are run twice with
241-
different settings, then filters from the first run will not be restored to
242-
the default state but will be replaced by a new one. To reset filters to the
243-
default state, a firmware reset is needed.
244243
245-
Detailed description
246-
--------------------
244+
Trace filtering details
245+
-----------------------
246+
247+
* The filtering mechanism occurs on the firmware side so, after changing the
248+
log level to verbose for each component, the DSP can be overwhelmed by
249+
tracing.
250+
251+
* Core functionality is provided by the DSP, so filtering does not work in
252+
offline mode - during conversion in a previously saved input file.
247253

248-
The filtering mechanism occurs on the firmware side so, after changing the
249-
log level to verbose for each component, the DSP can be overwhelmed by
250-
tracing.
254+
* The trace filtering affects only traces sent after the filter setup,
255+
so traces already stored on the kernel side are not affected. If a certain log level is needed before a filter has been setup the DECLARE_TR_CTX()
256+
macro at the beginning of the respective component's source file can be adapted.
251257

252-
Core functionality is provided by the DSP, so filtering does not work in
253-
offline mode - during conversion in a previously saved input file.
258+
* Filters are set up incrementally, so when loggers are run twice with
259+
different settings, then filters from the first run will not be restored to
260+
the default state but will be replaced by a new one. Active trace filters are stored in the firmware runtime memory. To reset the filters to the
261+
default state, a firmware reset is needed.
254262

255-
Communication between the firmware and logger is occurs through driver
256-
debug file systems. The logger writes new trace settings to ``sys/kernel/debug/sof/filter``. These will be used to create *IPC* messages with new
257-
trace levels. A simple text data format is used:
263+
* Communication between the firmware and logger occurs through the kernel debugfs. The logger writes new trace settings to ``sys/kernel/debug/sof/filter``.
264+
These will be used to create *IPC* messages with new trace levels. A simple text data format is used:
258265

259-
``log1_level uuid1_id pipe1_id comp1_id; [log2_level uuid2_id pipe2_id comp2_id;]\n``
266+
``log1_level uuid1_id pipe1_id comp1_id; [log2_level uuid2_id pipe2_id comp2_id;]\n``
260267

261-
Any unused uuid_id should be set here to 0; other unused fields should be
262-
set to -1. ``log_level`` must always be set to a valid value that represents ``LOG_LEVEL_*`` defined values.
268+
Any unused uuid_id should be set here to 0; other unused fields should be
269+
set to -1. ``log_level`` must always be set to a valid value that represents ``LOG_LEVEL_*`` defined values.

0 commit comments

Comments
 (0)