From e955b6540dde2ba41c67e6e94498bb2c6c76c082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Leksell?= Date: Tue, 16 Nov 2021 13:48:22 +0100 Subject: [PATCH] Tracing: Fixed TraceRecorder inclusion problem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved conditional inclusion of tracing_tracerecorder.h from the start of tracing.h to the bottom. This was the initial placement of this include but it was moved as part of PR #40126. If this file is included at the start of tracing.h the TraceRecorder module hooks will not map correctly and completely breaks that module. Signed-off-by: Torbjörn Leksell --- include/tracing/tracing.h | 48 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/include/tracing/tracing.h b/include/tracing/tracing.h index d09b324a35c..7489db4f6b0 100644 --- a/include/tracing/tracing.h +++ b/include/tracing/tracing.h @@ -37,30 +37,6 @@ * @{ */ -#if defined(CONFIG_PERCEPIO_TRACERECORDER) -#include "tracing_tracerecorder.h" -#else -/** - * @brief Called when entering an ISR - */ -void sys_trace_isr_enter(void); - -/** - * @brief Called when exiting an ISR - */ -void sys_trace_isr_exit(void); - -/** - * @brief Called when exiting an ISR and switching to scheduler - */ -void sys_trace_isr_exit_to_scheduler(void); - -/** - * @brief Called when the cpu enters the idle state - */ -void sys_trace_idle(void); -#endif /* CONFIG_PERCEPIO_TRACERECORDER */ - /** * @brief Thread Tracing APIs * @defgroup subsys_tracing_apis_thread Thread Tracing APIs @@ -2028,6 +2004,30 @@ void sys_trace_idle(void); /** @} */ /* end of subsys_tracing_apis_pm_device_runtime */ +#if defined(CONFIG_PERCEPIO_TRACERECORDER) +#include "tracing_tracerecorder.h" +#else +/** + * @brief Called when entering an ISR + */ +void sys_trace_isr_enter(void); + +/** + * @brief Called when exiting an ISR + */ +void sys_trace_isr_exit(void); + +/** + * @brief Called when exiting an ISR and switching to scheduler + */ +void sys_trace_isr_exit_to_scheduler(void); + +/** + * @brief Called when the cpu enters the idle state + */ +void sys_trace_idle(void); +#endif /* CONFIG_PERCEPIO_TRACERECORDER */ + /** @} */ /* end of subsys_tracing_apis */ /** @} */ /* end of subsys_tracing */