Performance Analysis
Which is an example of what CPU performance counters (the PMU) can count?
- AInstructions executed, cache misses, branch mispredictions and the like
- BThe number of people who wrote the program
- CThe number of keys on the keyboard
Show answer and explanation
Answer: A. Instructions executed, cache misses, branch mispredictions and the like
Performance counters are hardware counters that tally various events inside the CPU. Cycle and instruction counts give IPC, and counts of cache misses at each level, TLB misses, branch mispredictions and more are available. Tools such as Linux perf collect them while a program runs, providing clues to whether time is going to memory, branches or the computation itself.
- A. Correct. It counts events occurring inside the CPU.
- B. It cannot count people.
- C. It has nothing to do with keyboards.