telemetry: systick info
This patch introduces telemetry by adding systick info measurements. Also adds basic implementations of ipc's used for by our tests for systick info measurements. Currently this implementation only handles measurement of LL execution time, as measuring DP tasks may be a bit tricky.
This patch also requires increasing the size of memory window 2, which is on the Zephyr side. It may pass tests without it, but the results will be incorrect as it may write on memory occupied by Zephyr logs. This memory window size change is being taken care of also. Will link any related Zephyr PR's once they are created.
I'm a bit uncertain about some parts, so I'll self review with some questions.
Update:
- Added CONFIG_TELEMETRY as an option to disable telemetry
- Disabling telemetry for tgl, as there are some duplicated defines that describe memory windows which messes up the build.
- Disabling scheduler info dp for tgl, as it does not use zephyr_dp.
Update:
- changed ccount function to sof_cycle_get_64
- telemetry.c variables made static and added a set per core
- other minor fixes
Separators are useful to read data in f.e. http://rweverything.com/ in real life.
@tobonex is there a Linux corresponding PR? Can you please add a brief overview of what information is this interface is supposed to gather and add it into corresponding commit description.
I wonder if this telemetry feature shouldn't be better part of Zephyr as a whole?
Separators are useful to read data in f.e. http://rweverything.com/ in real life.
Not disagreeing for immutable data formats, but we will want to grow over time and this means we have to have a method to communicate to tooling about data format changes. We can probably grow by updating the below 2 items to indicate ABI version.
window->descs[slot_num].type = ADSP_DW_SLOT_TELEMETRY;
window->descs[slot_num].resource_id = 0;
CAVS25 https://sof-ci.01.org/sofpr/PR8737/build2569/devicetest/index.html looks OK.
On the other hand, MTL NOCODEC tests failed across the board: https://sof-ci.01.org/sofpr/PR8737/build2568/devicetest/index.html IPC timeout.
Also regarding timing: I don't see anywhere in the protocol where it's self-describing enough to actually define the units in question. The interpreting kernel code just needs to know what the relevant clock rate that the DSP is sampling? Shouldn't we store that somewhere?
@andyross my understanding would be the timestamps/units would be the same used in logging. @tobonex can you confirm ?
Update:
- Memory window size increase doesn't have to be done on Zephyr side, so I'm adding a new commit here instead.
- Fixed one issue in scheduler_get_task_info() in schedule.c
Some open issues still unaddressed, and one more from me. Otherwise looks Ok to me. But in the future I think we should write some generic debug slot reservation code to Zephyr size so that all the slots would be allocated in the same place.
Yes, with @marcinszkudlinski we were planning to clean up the slots in the near future. We were thinking about either defining all the slot owners in one file or writing this reservation process.
SOFCI TEST