Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
Cortex-R4F : need explanations about some PMU events
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
118 subscribers
Views
3009 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
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
Cortex-R4F : need explanations about some PMU events
Christophe Beausoleil
over 12 years ago
Note: This was originally posted on 29th July 2011 at
http://forums.arm.com
Hello,
I am using a Cortex-R4F (TMS570), and I used PMU to count the number of "Instruction architecturally executed" and "Dual-issued pair of instructions architecturally executed" (§6.1 of DDI0363E) in order to benchmark that component, and I get a strange result : I built a test code with 4096 instructions (in fact, a little bit more before and after the PMU is started/stopped), and I obtained :
- in ARM mode :
3083
Instruction architecturally executed
2048 Dual-issued pair of instructions architecturally executed
- in Thumb mode :
4015
Instruction architecturally executed
2048 Dual-issued pair of instructions architecturally executed
Please, could someone explain why the number of Instruction architecturally executed is not the same in both modes ?
And more important for me : how can I count the real number of instructions of any code ?
Thanks a lot
Best regards
Christophe
Parents
Martin Weidmann
over 12 years ago
Note: This was originally posted on 20th February 2012 at
http://forums.arm.com
You said that it should be 4096, how do you know this? What are you writing the code in? C will typically compile to more Thumb instructions than ARM instructions*, so what you've seen isn't necessarily wrong.
* There are cases where ARM instructions are more flexible than Thumb instructions. So the compiler can use one ARM instr or two Thumb instrs. This is less common with Thumb-2, but there are still some instances.
Cancel
Vote up
0
Vote down
Cancel
Reply
Martin Weidmann
over 12 years ago
Note: This was originally posted on 20th February 2012 at
http://forums.arm.com
You said that it should be 4096, how do you know this? What are you writing the code in? C will typically compile to more Thumb instructions than ARM instructions*, so what you've seen isn't necessarily wrong.
* There are cases where ARM instructions are more flexible than Thumb instructions. So the compiler can use one ARM instr or two Thumb instrs. This is less common with Thumb-2, but there are still some instances.
Cancel
Vote up
0
Vote down
Cancel
Children
No data