From 4abbd54cd5baac7587d8e33616b68077aa9c69c3 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sun, 29 Sep 2019 09:34:46 -0400 Subject: [PATCH] tracing: remove useless ifdefing for CONFIG_TRACING Tracing functions are noop if CONFIG_TRACING is disabled. Signed-off-by: Anas Nashif --- kernel/include/kswap.h | 8 -------- kernel/sched.c | 6 ------ 2 files changed, 14 deletions(-) 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