I am trying to use the hardware performance counter. As a first step, I am counting the unhalted processor cycles as a sanity check. I set PerfCtr0 (C001_0004h) to 0x430076, then read the result back every second and compute the difference from the previous read.
When processor is 100% busy, I got a read of something like 4,311,488,287. At the same time, I am also reading the time stamp counter (rdtsc), and I got a read of something like 2,917,032,298 for the same 1 sec period. Why do not the two numbers match?
The time stamp counter seems to match the clock frequency. So the question is why there are more unhalted cycles? Does it mean the system is overclocked? Am I doing something wrong?
BTW, I have no physical access to the server, which is located in a server room. Any help is greatly appreciated.