Skip to content

Commit

Permalink
tracing: riscv: fix tracing of context switch
Browse files Browse the repository at this point in the history
We had switched_in and switched_out mixed up.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif authored and carlescufi committed Aug 24, 2020
1 parent b234660 commit caa3480
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/riscv/core/isr.S
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ on_thread_stack:

reschedule:
#if CONFIG_TRACING
call sys_trace_thread_switched_in
call sys_trace_thread_switched_out
#endif
/* Get reference to _kernel */
la t0, _kernel
Expand Down Expand Up @@ -526,6 +526,9 @@ skip_load_fp_caller_saved_benchmark:
/* Release stack space */
addi sp, sp, __z_arch_esf_t_SIZEOF
#endif
#if CONFIG_TRACING
call sys_trace_thread_switched_in
#endif

no_reschedule:
#ifdef CONFIG_RISCV_SOC_CONTEXT_SAVE
Expand Down

0 comments on commit caa3480

Please sign in to comment.