diff options
author | dp-arm <dimitris.papastamos@arm.com> | 2016-11-15 13:25:30 +0000 |
---|---|---|
committer | dp-arm <dimitris.papastamos@arm.com> | 2016-12-14 09:53:14 +0000 |
commit | 7941816a3428f015a9f4a6c5dc978b4fca568f4b (patch) | |
tree | 0d25b1c07ffb685ec4f2de561ccb44e76337b2b4 /lib/psci/psci_suspend.c | |
parent | 1b5fa6ef1082ffb9979df4aad91525eda571eb50 (diff) |
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>
Diffstat (limited to 'lib/psci/psci_suspend.c')
-rw-r--r-- | lib/psci/psci_suspend.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/psci/psci_suspend.c b/lib/psci/psci_suspend.c index 10d2481d..dc2ab774 100644 --- a/lib/psci/psci_suspend.c +++ b/lib/psci/psci_suspend.c @@ -109,6 +109,17 @@ static void psci_suspend_to_pwrdown_start(unsigned int end_pwrlvl, */ cm_init_my_context(ep); +#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. Currently we assume that the power level correspond @@ -117,6 +128,12 @@ static void psci_suspend_to_pwrdown_start(unsigned int end_pwrlvl, * and the cpu-ops power down to perform from the platform. */ psci_do_pwrdown_cache_maintenance(max_off_lvl); + +#if ENABLE_RUNTIME_INSTRUMENTATION + PMF_CAPTURE_TIMESTAMP(rt_instr_svc, + RT_INSTR_EXIT_CFLUSH, + PMF_NO_CACHE_MAINT); +#endif } /******************************************************************************* |