diff --git a/arch/arm/core/aarch32/isr_wrapper.S b/arch/arm/core/aarch32/isr_wrapper.S index 3491fcfc31d..4aa3049c725 100644 --- a/arch/arm/core/aarch32/isr_wrapper.S +++ b/arch/arm/core/aarch32/isr_wrapper.S @@ -64,7 +64,7 @@ SECTION_FUNC(TEXT, _isr_wrapper) bl read_timer_start_of_isr #endif -#ifdef CONFIG_TRACING +#ifdef CONFIG_TRACING_ISR bl sys_trace_isr_enter #endif @@ -162,7 +162,7 @@ _idle_state_cleared: #endif /* CONFIG_EXECUTION_BENCHMARKING */ blx r3 /* call ISR */ -#ifdef CONFIG_TRACING +#ifdef CONFIG_TRACING_ISR bl sys_trace_isr_exit #endif diff --git a/arch/nios2/core/irq_manage.c b/arch/nios2/core/irq_manage.c index cfffba82d39..cd0ee540e8d 100644 --- a/arch/nios2/core/irq_manage.c +++ b/arch/nios2/core/irq_manage.c @@ -87,7 +87,9 @@ void _enter_irq(u32_t ipending) while (ipending) { struct _isr_table_entry *ite; +#ifdef CONFIG_TRACING_ISR sys_trace_isr_enter(); +#endif index = find_lsb_set(ipending) - 1; ipending &= ~BIT(index); @@ -99,7 +101,9 @@ void _enter_irq(u32_t ipending) read_timer_end_of_isr(); #endif ite->isr(ite->arg); +#ifdef CONFIG_TRACING_ISR sys_trace_isr_exit(); +#endif } _kernel.nested--; diff --git a/arch/riscv/core/isr.S b/arch/riscv/core/isr.S index e8b7ef4e04b..b0a61ef3669 100644 --- a/arch/riscv/core/isr.S +++ b/arch/riscv/core/isr.S @@ -228,7 +228,7 @@ on_irq_stack: call_irq: #endif /* CONFIG_IRQ_OFFLOAD */ -#ifdef CONFIG_TRACING +#ifdef CONFIG_TRACING_ISR call sys_trace_isr_enter #endif diff --git a/arch/x86/core/ia32/intstub.S b/arch/x86/core/ia32/intstub.S index 3272bfb3c68..2cb4bf72e0b 100644 --- a/arch/x86/core/ia32/intstub.S +++ b/arch/x86/core/ia32/intstub.S @@ -130,7 +130,7 @@ SECTION_FUNC(TEXT, _interrupt_enter) pushl %edi -#if defined(CONFIG_TRACING) +#if defined(CONFIG_TRACING_ISR) /* Save these as we are using to keep track of isr and isr_param */ pushl %eax diff --git a/subsys/debug/Kconfig b/subsys/debug/Kconfig index 6b5b66e7b8f..1b0460ff9a6 100644 --- a/subsys/debug/Kconfig +++ b/subsys/debug/Kconfig @@ -158,6 +158,12 @@ config TRACING_CMD_BUFFER_SIZE help Size of tracing command buffer. +config TRACING_ISR + bool "Enabling Tracing ISR" + help + Enable tracing ISR. This requires the backend to be + very low-latency. + endif config ASAN