soc: nordic: nrf54h: power: Add idle tracing calls

Add calls to sys_trace_idle and sys_trace_idle_exit in nrf54h specific
idle states to allow measuring CPU load on nrf54h20 when power
management is enabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2025-03-14 08:14:06 +01:00 committed by Benjamin Cabé
commit 37fe7504ce

View file

@ -175,17 +175,21 @@ void pm_state_set(enum pm_state state, uint8_t substate_id)
{
if (state == PM_STATE_SUSPEND_TO_IDLE) {
__disable_irq();
sys_trace_idle();
s2idle_enter(substate_id);
/* Resume here. */
s2idle_exit(substate_id);
sys_trace_idle_exit();
__enable_irq();
}
#if defined(CONFIG_PM_S2RAM)
else if (state == PM_STATE_SUSPEND_TO_RAM) {
__disable_irq();
sys_trace_idle();
s2ram_enter();
/* On resuming or error we return exactly *HERE* */
s2ram_exit();
sys_trace_idle_exit();
__enable_irq();
}
#endif