Programmed Profiling

1.1 Counters

In the previous talk, you heard about how to get information from the many performance counters maintained by the operating system. Because they are implemented in software, they represent part of the computational overhead of the Windows operating system. The cost of a software counter increases as its update frequency increases, so it is impractical to implement counters for such things as floating point operations (flops) in software. Similarly, some level 2 cache operations are monitored in software but level 1 cache operations are not.

Instead, recent editions of the Intel CPUs have included a couple of hardware counters on the chip. These counters impose no overhead on the system, but since there are only two of them and many more than two interesting things to measure, they have been designed so that they can configured using software.