I am want to use arm pmu to profile checksum algorithm performance, but the event counter always return 0, only cycle counter is normal.
The step i use as follows:
1. enable user enable by setting PMUSERENR.E bit
2. enable pmu enable by setting PMCR.E bit and event counter and reset cycle, event counter
3. set PMSELR and PMXEVTYPER
4. run checksum algorithm
5. read cpu cycle count and event counter
I found some people say reruires set SDER as 0b11, but i follow this, still no effect.
Does any step i have omit or whether it requires setting some other register before read event counter?
Hello
Read the PMCEIDx registers to ensure that the event type you are trying to measure is supported:https://developer.arm.com/documentation/ddi0406/cb/System-Level-Architecture/System-Control-Registers-in-a-VMSA-implementation/VMSA-System-control-registers-descriptions--in-register-order/PMCEID0-and-PMCEID1--Performance-Monitors-Common-Event-ID-registers--VMSA
There is an example project available at the below. The document is written for the older DS-5 toolchain, but most, if not all, is still relevant for Arm Development Studio:https://developer.arm.com/documentation/102601/0010/Setting-up-and-using-the-event-counters
Hi Synnott:
Thanks for your reply, i have read the PMCEID0, it is value is 0x7fffffff, and i follow the document to add test code, but the event counter still return 0, only cycle counter is normal.
do you have any other suggestion?
thanks.
What are you running on?
Hi Martin
I follow the https://developer.arm.com/documentation/102601/0010/Setting-up-and-using-the-event-counters and run this demo code, it also only return cycle counter, event counter still return 0.
Sorry, I should have been clearer. I meant what kind of platform are you using? For example, the FVP models shipped with DS-5, a development board...
Hi Martin:
I use MTK platform with armv7 cortex-A53 to profile checksum algorith performance .
thanks