Skip to content

Commit 1f6dd19

Browse files
Hoang Nguyennashif
authored andcommitted
arch: arm64: cortex_a: Add CPU load for Cortex-A
- Add calls to sys_trace_idle_exit before leaving idle state to track CPU load - Extend CPU_LOAD to CPU_CORTEX_A in Kconfig Signed-off-by: Hoang Nguyen <[email protected]> Signed-off-by: Nhut Nguyen <[email protected]>
1 parent 1ef9613 commit 1f6dd19

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

arch/arm64/core/cpu_idle.S

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ SECTION_FUNC(TEXT, arch_cpu_idle)
2323
#endif
2424
dsb sy
2525
wfi
26+
#ifdef CONFIG_TRACING
27+
str lr, [sp, #-16]!
28+
bl sys_trace_idle_exit
29+
ldr lr, [sp], #16
30+
#endif
2631
msr daifclr, #(DAIFCLR_IRQ_BIT)
2732
ret
2833
#endif
@@ -38,6 +43,11 @@ SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
3843
msr daifset, #(DAIFSET_IRQ_BIT)
3944
isb
4045
wfe
46+
#ifdef CONFIG_TRACING
47+
str lr, [sp, #-16]!
48+
bl sys_trace_idle_exit
49+
ldr lr, [sp], #16
50+
#endif
4151
tst x0, #(DAIF_IRQ_BIT)
4252
beq _irq_disabled
4353
msr daifclr, #(DAIFCLR_IRQ_BIT)

subsys/debug/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ config CS_TRACE_DEFMT
353353

354354
config CPU_LOAD
355355
select TRACING
356-
depends on CPU_CORTEX_M || RISCV
356+
depends on CPU_CORTEX_M || RISCV || CPU_CORTEX_A
357357
depends on !SMP
358358
bool "CPU load measurement"
359359

0 commit comments

Comments
 (0)