-
Notifications
You must be signed in to change notification settings - Fork 349
probe: add backend for logging via probes #6072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
probe: add backend for logging via probes #6072
Conversation
|
FYI @teburd |
|
@kv2019i we should be able to make this scriptable in sof-tools. We do need a separate demux tool though that can split pcm/log/trace data by slot into individual files. |
|
@lgirdwood wrote:
sof/tools/probes/probes_main.c is that demux tool, so we have that already. We might need a more integrated tool. One developer requirement is to observe "live" logs from the FW and the current palette of tools forces to cut the logging to see any decoded logs. So potentially we need a more unified tool that combines probe point configuration, reading data from compress PCM and calling log decoders (e.g. the zephyr/mipi tool for syst catalog). In the end, developer wants to see live logs in human-readable format on her console. FYI @marc-hb @jsarha @pjdobrowolski |
ok, we can update the existing tool to strip the container for slot N and send it's stdout to log/trace tool stdin as a cmd line option. |
99994aa to
04c5fc4
Compare
|
V2 update:
|
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kv2019i what are the next steps now ?
|
@lgirdwood wrote:
I'm close to complete an update that gets rid of the buffer-id overload, and simplifies the interface between logger and probe code. Thanks @ujfalusi for the feedback for the interface! Originally I was thinking that I keep this as draft until @jsarha and @abonislawski have the IPC4 updates ready, and then we merge probes logging as a IPC4 only feature. But, but, the latest versions starts to be so clean, so maybe we start with a IPC3 probes logging imlementation first. This can be used to kick off user-space tool development and testing, and then when the IPC4 work is ready, we can add that on top. I'll push a new PR update today. |
04c5fc4 to
f9556b7
Compare
|
V3 updated:
|
f9556b7 to
905a857
Compare
905a857 to
8770007
Compare
|
V4 update:
|
8770007 to
4276d25
Compare
|
V5 updated:
|
4276d25 to
2d4450a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and I see it picks up the buffer ID change from @lyakh PR too.
src/include/ipc/probe.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add TRACE here too (we can do in 1 ABI bump) as LOG and TRACE are different things in Zephyr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgirdwood I can add if it's ok to have it without matching implementation in this PR.
I wonder what I am missing. The echo steps does not produce an error and the probe point is there: Still there is no data captured by crecord ("We read 8192, DSP sent 0" all the time), and obviously nothing when I try to extract the capture. I have this branch and "CONFIG_LOG_BACKEND_SOF_PROBE=y" in my confing in addition to old probes options (PCM probes work), should I need something more? |
abcc223 to
2b0e74a
Compare
|
V6 uploaded:
|
Modify probe task to support cases where the amount of available data is not multiple of the DMA copy size, or wraps around in the DMA buffer. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Implement a Zephyr logging backend which routes the logs via SOF probes interface. Tested with Linux SOF driver, crecord and sof/tools/probes for decoding. The patch modifies the probes IPC3 interface, adding a new probe purpose field (PROBE_PURPOSE_LOGGING, 0x3) to specify probe extraction for logging. A field for system trace (as is also reserved (PROBE_PURPOSE_TRACING). Example usage in Linux: term1# crecord -c3 -d0 -b8192 -f4 -FS32_LE -R48000 -C4 /tmp/extract.dat term2# echo 0,3,0 > /sys/kernel/debug/sof/probe_points term1# <terminate crecord> term1# sof-probes -p /tmp/extract.dat term1# cat buffer_0.bin Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
probe logging: add backend for logging via probes