arch/x86_64: Add hook for CONFIG_SCHED_THREAD_USAGE accounting in ISRs
Call into z_thread_usage_stop() before ISR entry to avoid including interrupt handling totals in thread usage stats. This has to go into the assembly immediately before the callback-based dispatch. Note that the dispatch code was putting the vector number in RCX, which was unfortunate as that's a caller-saved register. Would be nice to clean this up in the future so it lives in a preserved register but it's mildly complicated to make work with the way we do the stack layout right now. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
76b848e38c
commit
1238410914
1 changed files with 5 additions and 0 deletions
|
@ -778,6 +778,11 @@ irq_enter_unnested: /* Not nested: dump state to thread struct for __resume */
|
|||
#endif
|
||||
|
||||
irq_dispatch:
|
||||
#ifdef CONFIG_SCHED_THREAD_USAGE
|
||||
pushq %rcx
|
||||
call z_sched_usage_stop
|
||||
popq %rcx
|
||||
#endif
|
||||
movq x86_irq_funcs(,%rcx,8), %rax
|
||||
movq x86_irq_args(,%rcx,8), %rdi
|
||||
call *%rax
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue