05-05-2005 09:40 AM
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?
05-19-2005 03:46 PM
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.