From ef292d261e1eef02dcccd4d4723b404f564c183a Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Fri, 18 Oct 2024 12:00:36 +0300 Subject: [PATCH 1/2] trace: move xtos/include/sof/trace/preproc*.h to app level 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: https://github.com/thesofproject/sof/issues/9015 Signed-off-by: Kai Vehmanen --- {xtos => src}/include/sof/trace/preproc-private-dec.h | 0 {xtos => src}/include/sof/trace/preproc-private-inc.h | 0 {xtos => src}/include/sof/trace/preproc-private.h | 0 {xtos => src}/include/sof/trace/preproc.h | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {xtos => src}/include/sof/trace/preproc-private-dec.h (100%) rename {xtos => src}/include/sof/trace/preproc-private-inc.h (100%) rename {xtos => src}/include/sof/trace/preproc-private.h (100%) rename {xtos => src}/include/sof/trace/preproc.h (100%) diff --git a/xtos/include/sof/trace/preproc-private-dec.h b/src/include/sof/trace/preproc-private-dec.h similarity index 100% rename from xtos/include/sof/trace/preproc-private-dec.h rename to src/include/sof/trace/preproc-private-dec.h diff --git a/xtos/include/sof/trace/preproc-private-inc.h b/src/include/sof/trace/preproc-private-inc.h similarity index 100% rename from xtos/include/sof/trace/preproc-private-inc.h rename to src/include/sof/trace/preproc-private-inc.h diff --git a/xtos/include/sof/trace/preproc-private.h b/src/include/sof/trace/preproc-private.h similarity index 100% rename from xtos/include/sof/trace/preproc-private.h rename to src/include/sof/trace/preproc-private.h diff --git a/xtos/include/sof/trace/preproc.h b/src/include/sof/trace/preproc.h similarity index 100% rename from xtos/include/sof/trace/preproc.h rename to src/include/sof/trace/preproc.h From f36a4c99b16d07de0ad0538a2a1874219243790c Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Fri, 18 Oct 2024 12:54:10 +0300 Subject: [PATCH 2/2] trace: make CONFIG_TRACE=n the default for Zephyr builds 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 --- src/trace/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/trace/Kconfig b/src/trace/Kconfig index e691bc9e3cd3..5ff6b2001130 100644 --- a/src/trace/Kconfig +++ b/src/trace/Kconfig @@ -6,9 +6,12 @@ menu "Trace" config TRACE bool "Trace" + default n if ZEPHYR_SOF_MODULE default y help - Enabling traces. All traces (normal and error) are sent by dma. + Enable SOF DMA based traces compatible with the sof-logger tool. + With Zephyr, RTOS side events are not seen in the SOF trace, so native + Zephyr logging (CONFIG_ZEPHYR_LOG) is recommended instead. config TRACEV bool "Trace verbose"