Skip to content

Commit 9cf4ded

Browse files
committed
debugability: logger: add note on DMA trace limitations
If sof-logger is started (or restarted) while DSP is running, the initial traces may be incomplete. Document the limitation and give a brief explanation of the current ringbuffer design and how it affects the start-up behaviour. BugLink: thesofproject/sof-test#297 BugLink: thesofproject/linux#3275 Signed-off-by: Kai Vehmanen <[email protected]>
1 parent 9426615 commit 9cf4ded

File tree

1 file changed

+14
-0
lines changed
  • developer_guides/debugability/logger

1 file changed

+14
-0
lines changed

developer_guides/debugability/logger/index.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,20 @@ Examples
136136
distribution kernels ``sof_debug=1`` module option for ``snd_sof`` might be
137137
needed if the /sys/kernel/debug/sof/trace file is not present)
138138

139+
.. note::
140+
If sof-logger is started (or restarted) while firmware is active, the initial
141+
trace messages might be incomplete. This can happen as current (as of SOF version
142+
1.9) trace is implemented with a ringbuffer between firmware and the kernel driver.
143+
When sof-logger is started, kernel will always start to read the ringbuffer from
144+
0 position, independently of firmware state. If firmware write pointer just wrapped
145+
around when sof-logger is started, sof-logger will only show the traces after
146+
the wrap. Firmware write position is also reset whenever firmware is booted,
147+
including runtime suspend and resume. To capture traces over runtime suspend
148+
events, the kernel trace interface will signal end of file at runtime suspend.
149+
When sof-logger notices the end of file marker, it will reopen the trace
150+
file and start reading from position 0 and thus be in sync with the firmware
151+
when it is resumed.
152+
139153
Trace filtering
140154
***************
141155

0 commit comments

Comments
 (0)