xtos: move sof/lib/perf_cnt.h to application interface #9494
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The SOF perf_cnt.h provides a simple performance counter interface that is used in SOF to track performance at audio module and pipeline level.
Majority of the implementation is RTOS agnostic, relying on sof_cycle_get_64() to sample platform clock, and timer_get_system() for CPU clock, both defined in rtos/timer.h. There is however some conditional rules for Zephyr to use timing_counter_get() if SOF is built with CONFIG_TIMING_FUNCTIONS=y.
The amount of RTOS variation does not seem to warrant branching the whole perf_cnt.h to RTOS layer. Move perf_cnt.h back to application interface, so the single implementation can be shared.
Link: #9015