diff --git a/kernel/include/kswap.h b/kernel/include/kswap.h index 7991be97a29..c4073892c7c 100644 --- a/kernel/include/kswap.h +++ b/kernel/include/kswap.h @@ -53,9 +53,7 @@ static ALWAYS_INLINE unsigned int do_swap(unsigned int key, z_check_stack_sentinel(); -#ifdef CONFIG_TRACING sys_trace_thread_switched_out(); -#endif if (is_spinlock) { k_spin_release(lock); @@ -84,9 +82,7 @@ static ALWAYS_INLINE unsigned int do_swap(unsigned int key, &old_thread->switch_handle); } -#ifdef CONFIG_TRACING sys_trace_thread_switched_in(); -#endif if (is_spinlock) { z_arch_irq_unlock(key); @@ -125,15 +121,11 @@ static inline int z_swap_irqlock(unsigned int key) z_check_stack_sentinel(); #ifndef CONFIG_ARM -#ifdef CONFIG_TRACING sys_trace_thread_switched_out(); -#endif #endif ret = __swap(key); #ifndef CONFIG_ARM -#ifdef CONFIG_TRACING sys_trace_thread_switched_in(); -#endif #endif return ret; diff --git a/kernel/sched.c b/kernel/sched.c index eee6a8720a2..5bb6e992196 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -593,13 +593,7 @@ struct k_thread *z_get_next_ready_thread(void) /* Just a wrapper around _current = xxx with tracing */ static inline void set_current(struct k_thread *new_thread) { -#ifdef CONFIG_TRACING - sys_trace_thread_switched_out(); -#endif _current = new_thread; -#ifdef CONFIG_TRACING - sys_trace_thread_switched_in(); -#endif } #ifdef CONFIG_USE_SWITCH