Browse Source

tracing: Allow disabling idle traces

This change allows for enabling/disabling the idle traces by setting the
CONFIG_TRACING_IDLE config.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
pull/82801/merge
Krzysztof Sychla 3 weeks ago committed by Dan Kalowsky
parent
commit
dcdc7d315e
  1. 6
      subsys/tracing/Kconfig
  2. 2
      subsys/tracing/ctf/ctf_top.c
  3. 2
      subsys/tracing/sysview/sysview.c
  4. 4
      subsys/tracing/test/tracing_string_format_test.c

6
subsys/tracing/Kconfig

@ -354,6 +354,12 @@ config TRACING_GPIO @@ -354,6 +354,12 @@ config TRACING_GPIO
help
Enable tracing GPIO.
config TRACING_IDLE
bool "Tracing Idle"
default y
help
Enable tracing Idle state.
endmenu # Tracing Configuration
endif

2
subsys/tracing/ctf/ctf_top.c

@ -189,7 +189,9 @@ void sys_trace_isr_exit_to_scheduler(void) @@ -189,7 +189,9 @@ void sys_trace_isr_exit_to_scheduler(void)
void sys_trace_idle(void)
{
#ifdef CONFIG_TRACING_IDLE
ctf_top_idle();
#endif
if (IS_ENABLED(CONFIG_CPU_LOAD)) {
cpu_load_on_enter_idle();
}

2
subsys/tracing/sysview/sysview.c

@ -64,7 +64,9 @@ void sys_trace_isr_exit_to_scheduler(void) @@ -64,7 +64,9 @@ void sys_trace_isr_exit_to_scheduler(void)
void sys_trace_idle(void)
{
#ifdef CONFIG_TRACING_IDLE
SEGGER_SYSVIEW_OnIdle();
#endif
if (IS_ENABLED(CONFIG_CPU_LOAD)) {
cpu_load_on_enter_idle();

4
subsys/tracing/test/tracing_string_format_test.c

@ -201,12 +201,16 @@ void sys_trace_isr_exit_to_scheduler(void) @@ -201,12 +201,16 @@ void sys_trace_isr_exit_to_scheduler(void)
void sys_trace_idle(void)
{
#ifdef CONFIG_TRACING_IDLE
TRACING_STRING("%s\n", __func__);
#endif
}
void sys_trace_idle_exit(void)
{
#ifdef CONFIG_TRACING_IDLE
TRACING_STRING("%s\n", __func__);
#endif
}
void sys_trace_k_condvar_broadcast_enter(struct k_condvar *condvar)

Loading…
Cancel
Save