From e5e6ba240de221dcec0e2c31e837a888c65f1f11 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 4 Aug 2020 18:15:09 -0400 Subject: [PATCH] tracing: posix_arch: trace swap Moving trace points to the architecture code. Signed-off-by: Anas Nashif --- arch/posix/core/swap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/posix/core/swap.c b/arch/posix/core/swap.c index 373e7c28fe0..d3bf703621a 100644 --- a/arch/posix/core/swap.c +++ b/arch/posix/core/swap.c @@ -30,6 +30,9 @@ int arch_swap(unsigned int key) * and so forth. But we do not need to do so because we use posix * threads => those are all nicely kept by the native OS kernel */ +#if CONFIG_TRACING + sys_trace_thread_switched_out(); +#endif _current->callee_saved.key = key; _current->callee_saved.retval = -EAGAIN; @@ -47,6 +50,9 @@ int arch_swap(unsigned int key) _current = _kernel.ready_q.cache; +#if CONFIG_TRACING + sys_trace_thread_switched_in(); +#endif /* * Here a "real" arch would load all processor registers for the thread