tracing: avoid building tracing code when not applicable
Do not build tracing system if provided otherwise, for example right now systemview does not need any of the zephyr interfaces. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
d9be19e40e
commit
f05dbf9f6a
2 changed files with 11 additions and 7 deletions
|
@ -6,12 +6,12 @@ zephyr_sources_ifdef(
|
||||||
)
|
)
|
||||||
|
|
||||||
zephyr_sources_ifdef(
|
zephyr_sources_ifdef(
|
||||||
CONFIG_TRACING
|
CONFIG_TRACING_CORE
|
||||||
tracing_buffer.c
|
tracing_buffer.c
|
||||||
tracing_core.c
|
tracing_core.c
|
||||||
tracing_format_common.c
|
tracing_format_common.c
|
||||||
)
|
)
|
||||||
|
if(CONFIG_TRACING_CORE)
|
||||||
zephyr_sources_ifdef(
|
zephyr_sources_ifdef(
|
||||||
CONFIG_TRACING_SYNC
|
CONFIG_TRACING_SYNC
|
||||||
tracing_format_sync.c
|
tracing_format_sync.c
|
||||||
|
@ -36,6 +36,7 @@ zephyr_sources_ifdef(
|
||||||
CONFIG_TRACING_BACKEND_POSIX
|
CONFIG_TRACING_BACKEND_POSIX
|
||||||
tracing_backend_posix.c
|
tracing_backend_posix.c
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
zephyr_include_directories_ifdef(
|
zephyr_include_directories_ifdef(
|
||||||
CONFIG_TRACING
|
CONFIG_TRACING
|
||||||
|
|
|
@ -16,6 +16,11 @@ config TRACING
|
||||||
|
|
||||||
if TRACING
|
if TRACING
|
||||||
|
|
||||||
|
config TRACING_CORE
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
Automatically selected by formats that require the core
|
||||||
|
tracing infrastructure.
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Tracing Format"
|
prompt "Tracing Format"
|
||||||
|
@ -32,18 +37,15 @@ config SEGGER_SYSTEMVIEW
|
||||||
select RTT_CONSOLE
|
select RTT_CONSOLE
|
||||||
select USE_SEGGER_RTT
|
select USE_SEGGER_RTT
|
||||||
|
|
||||||
config TRACING_SYSTEMVIEW
|
|
||||||
bool "Tracing via SEGGER Systemview support"
|
|
||||||
help
|
|
||||||
Enable tracing using SEGGER Systemview.
|
|
||||||
|
|
||||||
config TRACING_CTF
|
config TRACING_CTF
|
||||||
bool "Tracing via Common Trace Format support"
|
bool "Tracing via Common Trace Format support"
|
||||||
|
select TRACING_CORE
|
||||||
help
|
help
|
||||||
Enable tracing to a Common Trace Format stream.
|
Enable tracing to a Common Trace Format stream.
|
||||||
|
|
||||||
config TRACING_CPU_STATS
|
config TRACING_CPU_STATS
|
||||||
bool "Enable CPU usage tracing"
|
bool "Enable CPU usage tracing"
|
||||||
|
select TRACING_CORE
|
||||||
help
|
help
|
||||||
Module provides information about percent of CPU usage based on
|
Module provides information about percent of CPU usage based on
|
||||||
tracing hooks for threads switching in and out, interrupts enters
|
tracing hooks for threads switching in and out, interrupts enters
|
||||||
|
@ -53,6 +55,7 @@ config TRACING_CPU_STATS
|
||||||
|
|
||||||
config TRACING_TEST
|
config TRACING_TEST
|
||||||
bool "Tracing for test usage"
|
bool "Tracing for test usage"
|
||||||
|
select TRACING_CORE
|
||||||
help
|
help
|
||||||
Enable tracing for testing kinds of format purpose. It must
|
Enable tracing for testing kinds of format purpose. It must
|
||||||
implement the tracing hooks defined in tracing_test.h
|
implement the tracing hooks defined in tracing_test.h
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue