mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 10:08:47 +00:00
Add two timestamps to measure PSCI cache flush overhead
Testing showed that the time spent in a cluster power down operation is dominated by cache flushes. Add two more timestamps in runtime instrumentation to keep track of the time spent flushing the L1/L2 caches. Change-Id: I4c5a04e7663543225a85d3c6b271d7b706deffc4 Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
This commit is contained in:
parent
1b5fa6ef10
commit
7941816a34
3 changed files with 37 additions and 1 deletions
|
@ -107,12 +107,29 @@ int psci_do_cpu_off(unsigned int end_pwrlvl)
|
|||
psci_stats_update_pwr_down(end_pwrlvl, &state_info);
|
||||
#endif
|
||||
|
||||
#if ENABLE_RUNTIME_INSTRUMENTATION
|
||||
|
||||
/*
|
||||
* Flush cache line so that even if CPU power down happens
|
||||
* the timestamp update is reflected in memory.
|
||||
*/
|
||||
PMF_CAPTURE_TIMESTAMP(rt_instr_svc,
|
||||
RT_INSTR_ENTER_CFLUSH,
|
||||
PMF_CACHE_MAINT);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Arch. management. Perform the necessary steps to flush all
|
||||
* cpu caches.
|
||||
*/
|
||||
psci_do_pwrdown_cache_maintenance(psci_find_max_off_lvl(&state_info));
|
||||
|
||||
#if ENABLE_RUNTIME_INSTRUMENTATION
|
||||
PMF_CAPTURE_TIMESTAMP(rt_instr_svc,
|
||||
RT_INSTR_EXIT_CFLUSH,
|
||||
PMF_NO_CACHE_MAINT);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Plat. management: Perform platform specific actions to turn this
|
||||
* cpu off e.g. exit cpu coherency, program the power controller etc.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue