I’m trying to understand the perf stat output, but I’m confused by two specific metrics. What exactly do ‘stalled-cycles-frontend’ and ‘stalled-cycles-backend’ mean? I’ve searched online for answers but haven’t found a clear explanation. Here is an example of the output I’m looking at:
$ perf_tool measure command_x
Performance stats for 'command_x':
1.234567 task-clock # 0.987 CPUs used
10 context-switches # 0.008 K/sec
2 CPU-migrations # 0.002 K/sec
456 page-faults # 0.369 M/sec
1234567 cycles # 1.000 GHz
2345678 stalled-cycles-frontend # 189.99% frontend cycles idle
1456789 stalled-cycles-backend # 118.00% backend cycles idle
3456789 instructions # 2.80 insns per cycle
# 0.68 stalled cycles per insn
567890 branches # 460.000 M/sec
12345 branch-misses # 2.17% of all branches
0.001234567 seconds time elapsed
Can anyone help me understand what these metrics represent and why they’re important?