tracing: add TRACING_ISR Kconfig
Add TRACING_ISR Kconfig to help high latency backend working well. Currently the ISR tracing hook function is put at the begining and ending of ISR wrapper, when there is ISR needed in the tracing path (especially tracing backend), it will cause tracing buffer easily be exhausted if async tracing method enabled. Also it will increase system latency if all the ISRs are traced. So add TRACING_ISR to enable/disable ISR tracing here. Later a filter out mechanism based on irq number will be added. Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This commit is contained in:
parent
10a669ea87
commit
aa5d45d7cc
|
@ -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
|
||||
|
||||
|
|
|
@ -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--;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue