test: benchmarking: Timing metrics for the kernel

JIRA: ZEP-1822, ZEP-1823, ZEP-1825

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit is contained in:
Adithya Baglody 2017-05-03 13:11:51 +05:30 committed by Anas Nashif
commit d03b2496cd
19 changed files with 1486 additions and 1 deletions

View file

@ -43,6 +43,10 @@ SECTION_FUNC(TEXT, _isr_wrapper)
push {lr} /* lr is now the first item on the stack */
#ifdef CONFIG_EXECUTION_BENCHMARKING
bl read_systick_start_of_isr
#endif
#ifdef CONFIG_KERNEL_EVENT_LOGGER_INTERRUPT
bl _sys_k_event_logger_interrupt
#endif
@ -105,6 +109,20 @@ _idle_state_cleared:
* in thumb mode */
ldm r1!,{r0,r3} /* arg in r0, ISR in r3 */
#ifdef CONFIG_EXECUTION_BENCHMARKING
#if defined(CONFIG_ARMV6_M)
push {r3}
#endif
push {lr}
bl read_systick_end_of_isr
#if defined(CONFIG_ARMV6_M)
pop {r3}
mov lr,r3
pop {r3}
#else
pop {lr}
#endif
#endif
blx r3 /* call ISR */
#if defined(CONFIG_ARMV6_M)

View file

@ -177,6 +177,23 @@ _thread_irq_disabled:
msr PSP, ip
#ifdef CONFIG_EXECUTION_BENCHMARKING
#if defined(CONFIG_ARMV6_M)
push {r3}
#endif
push {lr}
bl read_systick_end_of_swap
#if defined(CONFIG_ARMV6_M)
pop {r3}
mov lr,r3
pop {r3}
#else
pop {lr}
#endif
#endif
/* exc return */
bx lr
@ -292,6 +309,20 @@ _oops:
SECTION_FUNC(TEXT, __swap)
#ifdef CONFIG_EXECUTION_BENCHMARKING
#if defined(CONFIG_ARMV6_M)
push {r3}
#endif
push {lr}
bl read_systick_start_of_swap
#if defined(CONFIG_ARMV6_M)
pop {r3}
mov lr,r3
pop {r3}
#else
pop {lr}
#endif
#endif
ldr r1, =_kernel
ldr r2, [r1, #_kernel_offset_to_current]
str r0, [r2, #_thread_offset_to_basepri]