Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[ArmV8] [Cortex-A53] [PMU] PM_CCNTR to measure cpuload

Dear Experts

I am working on a target that contains quad A53 cores operating at 1GHz. The operating system idle loop contains WFI inline assembly instruction. I know that the Core Clock halts during the WFI instruction which can be seen on the PM_CCNTR counts.

I was thinking if I can utilize this fact to get some figures around the system cpu_load. The idea is if I am sampling the PM_CCNTR on a regular bases with time stamp. I can use these time stamps to calculate the diff time between to consecutive samples. do the PM_CCNTR diff value can be indicative to the cpuload?

example: if I am sampling every 10ms seconds I should expect 10,000,000 counts if the core utilization is 100%. If I got 7,000,000 this means that the core spent 30% of the time in the idle loop. hence, the cpu load should be 70%.

Note: there is no where else on the code where WFI is been used.

My question: Is this methodology make sense? Is there any thing that could alter the core clock other than the WFI instruction? What else should I take into account?

Parents Reply Children
No data