Skip to content
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

xtos: move sof/lib/perf_cnt.h to application interface #9494

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Sep 19, 2024

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

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: thesofproject#9015
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@lgirdwood
Copy link
Member

@kv2019i doxygen

[doxygen](https://github.com/thesofproject/sof/actions/runs/10939883130/job/30371097368?pr=9494#logs)
failed yesterday in 31s
Search logs
0s
2s
6s
17s
1s
Run printf 'WARN_AS_ERROR = FAIL_ON_WARNINGS\n' >> doc/sof.doxygen.in && ninja -C docbuild -v doc
ninja: Entering directory `docbuild'
[0/[1](https://github.com/thesofproject/sof/actions/runs/10939883130/job/30371097368?pr=9494#step:5:1)] /usr/local/bin/cmake --regenerate-during-build -S/home/runner/work/sof/sof/doc -B/home/runner/work/sof/sof/docbuild
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/runner/work/sof/sof/docbuild
[0/1] cd /home/runner/work/sof/sof/docbuild && doxygen sof.doxygen
/home/runner/work/sof/sof/src/include/sof/lib/perf_cnt.h:9: warning: the name 'xtos/include/sof/lib/perf_cnt.h' supplied as the argument in the \file statement is not an input file
FAILED: CMakeFiles/doc /home/runner/work/sof/sof/docbuild/CMakeFiles/doc 
cd /home/runner/work/sof/sof/docbuild && doxygen sof.doxygen
ninja: build stopped: subcommand failed.
Error: Process completed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants