-
Notifications
You must be signed in to change notification settings - Fork 321
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
trace: move xtos/include/sof/trace/preproc*.h to app level (and change default for CONFIG_TRACE) (OPTION A) #9598
Conversation
Move the SOF trace implementation back to app level. While Zephyr logging is preferred solution for newer targets, the old sof-logger can be supported in Zephyr and code exists to support this usage. Move the trace preprocessor back to app level and allow it to be used if CONFIG_TRACE=y is set in the build. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Make CONFIG_TRACE=n the default for Zephyr builds and update document to explain the trade-offs when using CONFIG_TRACE on Zephyr. Signed-off-by: Kai Vehmanen <[email protected]>
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 do we really want to bring back these headers into common lib ? we want to make these deprecated and remove alongside with xtos support.
@lgirdwood wrote:
That is a good question. I did initially try to just make preproc.h unavailable in Zephyr builds (to implement #9015, this preproc.h is one of the last blockers to enable strict headers mode for Zephyr builds), but hit soome surprising issues. It seems there are two uses of preproc.h in SOF Zephyr builds, one that hits already in CI:
While contemplating on how to address 1+2, I figured maybe better to have the preproc.h stuff in one place (now it's split between app level trace.h and rtos headers) and gate it with build options to use DMA-trace (or the SOF special build with no logs that uses preproc.h as well). These headers would not have effect unless you have (CONFIG_TRACE=y || CONFIG_ZEPHYR_LOG=n), and once we have no CONFIG_TRACE users left, the files can be removed. I can work on an alternative PR with the assumption we drop support for sof-logger on Zephyr (2 above). If we decide on this, it might make sense to have a alternative smaller implementation for the "no logging build" problem. and keep preproc.h stuff in the old place under xtos headers. I did start on this, but then realized that if we keep (2) open, this is futile work and we need full preproc.h for Zephyr in the end still. |
We should be using native Zephyr tooling for logs etc - no point in maintaining 2 sets of tools, if Zephyr log toll missing features then we should upstream them into Zephyr. This can wait though until everyone is ready on Zephyr and xtos is removed. This would also means making all all code use native Zephyr logging APIs. There may also be some low hanging fruit by removing unused parts of the pre-proc headers. |
#9603 merged instead, closing this. |
UPDATE: alternative implementation to this PR -> #9603
trace: make CONFIG_TRACE=n the default for Zephyr builds
trace: move xtos/include/sof/trace/preproc*.h to app level
Link: #9015
See also #9597 to make sof-logger dependent code more clearly separated.