Performance Analysis

Which is an example of what CPU performance counters (the PMU) can count?

  1. AInstructions executed, cache misses, branch mispredictions and the like
  2. BThe number of people who wrote the program
  3. 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.
Practice this topic Back to topic

More Performance Analysis questions

  1. Performance counters show a program's IPC is very low at 0.3, with many last-level cache misses. Which pairs the likely situation with a remedy?
  2. Performance counters reveal very frequent branch mispredictions. Which is a suitable remedy?
  3. In top-down microarchitecture analysis using performance counters, which are the major categories into which CPU issue slots are divided?
  4. A program is slow, yet CPU utilization is only about 20%. What is the most likely cause?
  5. To check whether a program is compute-bound or memory-bound, its run time is measured at different CPU frequencies. What is the typical result if it is memory-bound?