Profile low condition events.
Add the sleep events point for x86 and ARM arquitectures that gives information about when the CPU went to sleep mode, when it woke up and which interrupt causes the CPU to awake. Change-Id: Iaa06a678eab661357d084ee1f79c4cfcf19bf85d Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
parent
d2108bf084
commit
5c6ef8fdb5
9 changed files with 64 additions and 0 deletions
|
@ -134,6 +134,12 @@ SECTION_FUNC(TEXT, _NanoIdleValClear)
|
|||
*/
|
||||
|
||||
SECTION_FUNC(TEXT, nano_cpu_idle)
|
||||
#ifdef CONFIG_PROFILER_SLEEP
|
||||
push {lr}
|
||||
bl _sys_profiler_enter_sleep
|
||||
pop {lr}
|
||||
#endif
|
||||
|
||||
/* clear BASEPRI so wfi is awakened by incoming interrupts */
|
||||
eors.n r0, r0
|
||||
msr BASEPRI, r0
|
||||
|
@ -169,6 +175,11 @@ SECTION_FUNC(TEXT, nano_cpu_idle)
|
|||
*/
|
||||
|
||||
SECTION_FUNC(TEXT, nano_cpu_atomic_idle)
|
||||
#ifdef CONFIG_PROFILER_SLEEP
|
||||
push {lr}
|
||||
bl _sys_profiler_enter_sleep
|
||||
pop {lr}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* r0: interrupt mask from caller
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue