Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous82
Beginner
78 Views

How to sample Halt CPU cycles in Intel M processor?

Hi, All
I am profiling a game engine on IBM Intel M processor. The scenario is as following:
I press keys continuously in the game,the clockticks I collected for my game engine is reduced a lot comparing with whenI didn't do any interaction with game engine.
As the documents of VTune 7.2 said, clockticks I counted in M processor is non-halt cycles, so I think the rest amount of CPU is spent on halt instruction. But I don't understand what happened during halt, is that because the I/O from keyboard? How can I exactly know it?
Thanks!
YGU
0 Kudos
1 Reply
David_A_Intel1
Employee
78 Views

I don't completely understand the issue, as you have stated it. Are you saying that when you collect clockticks you get more samples in your code when you aren't pressing the keys? This would make sense, right? Since the system is busy servicing the keyboard instead of executing your code.
One solution to collecting samples when the processor is halted is to use Time-Based Sampling (TBS) instead of EBS. This basically ensures you get a sample, even if the processor is halted, because the timer will force the processor out of halt to service the interrupt.
Also, as the documentation points out, there is a corresponding Non-sleep Clockticks events. This will include clockticks when the processor is halted, but not asleep.
Hope this helps.
Reply