Intel® VTune™ Performance Analyzer for Windows* - Non-halted Clockticks and Clockticks
Solution: The sampling interrupt is only generated when the "Sample After" number of Clockticks events occurs, and the Non-halted Clockticks event does not count clocks when the CPU is executing a Halt instruction. Therefore, a halted processor will not be interrupted because only Clockticks occurring when the CPU is not halted would generate sampling interrupts.
These 2 events are meant to support 2 different types of sampling functionality:
Clockticks:
If an Intel® VTune™ Analyzer user wants to see how much time the processor is idle, this event can be used along with the Process view of the analyzer to see the percentage of time spent in the System Idle process. This allows the user to see that the CPU was idle for XX% of the total CPU time.
Non-halted Clockticks:
If the user simply wants to see how much time the CPU spent in a specific task as a percentage of useful CPU work, this is the event to use. We have had users accidentally use this event to tune a device driver and get confused when they see the driver consumed 90% of the CPU. The issue is that the driver spent 90% of the NON-IDLE CPU time, but the CPU spent a lot of time idle so in terms of TOTAL CPU time, the driver was a small overall percentage.
The other thing to consider is that the sampling interrupt occurs approximately every 1 millisecond and it takes only a few hundred instructions, so it doesn't perturb CPU execution very much and executes very quickly. On processors that run at more than 1 GHz, this is a small amount of time.
Relevant Information: Sampling, EBS
For more complete information about compiler optimizations, see our Optimization Notice.