I’ve been experimenting with the perf stat
command and I’m puzzled by two specific metrics in the results. What exactly do ‘stalled-cycles-frontend’ and ‘stalled-cycles-backend’ represent? I searched online for clarity but didn’t come across a definitive explanation. Below is an example of the output I’m seeing:
$ perf stat echo "Hello World"
Performance stats:
0.501234 task-clock # 0.654 CPUs used
0 context-switches # 0.000 K/sec
0 CPU-migrations # 0.000 K/sec
156 page-faults # 0.311 M/sec
567890 cycles # 1.133 GHz
789012 stalled-cycles-frontend # 138.94% frontend cycles idle
456789 stalled-cycles-backend # 80.44% backend cycles idle
678901 instructions # 1.20 insns per cycle
# 1.16 stalled cycles per insn
123456 branches # 246.304 M/sec
7890 branch-misses # 6.39% of all branches
0.000766543 seconds time elapsed
Can anyone help clarify what these metrics indicate and why they’re significant?