Can anyone help?
I believe the event you are looking for is "SWINCR". This is a count of "Architecturally executed instructions." See ARM ARM C.12.8 for more details of what this count actually relates to.
Hope this helps.
Chris
Thank you. I tried and when I use the SWINCR(in armv7 cortex-a9 is number 0x00 event) to collect information ,I only get 0 every time I read the counter in my experiment,but the other counter event works well,like data cache miss,instruction cache miss...,why?
What kind of target are you using?
The Fast Models don't fully model the PMU, and most of the events aren't functional. Meaning that you get counts of zero.
I am using for collecting CPIs. How to read the counter event "SWINCR" ,is there any different with other counter events? And the Armv7 manual says that "PMSWINC is a write-only register".Dose it mean that I can't read it?
The SW_INCR event only counts writes to the PMSWINCR register, not all architecturally executed instructions.
For Cortex-A9, there is no PMU event that counts the architecturally executed instructions. The closest available event is 0x68 as described by song846079 below.