在 perf stat 中,缓存未命中百分比后的 +-# 是什么意思?
What does +-# after percent of cache misses mean in perf stat?
我使用了perf stat --repeat 100 -e cache-references,cache- misses,cycles,instructions,branches,faults,migrations ./avx2ADD
命令,输出如下。当缓存未命中百分比等于 4.010 %
时,cache-misses
的 +- 8.93%
是什么意思?
32,425 cache-references ( +- 0.54% )
1,300 cache-misses # 4.010 % of all cache refs ( +- 8.93% )
538,839 cycles ( +- 0.28% )
520,056 instructions # 0.97 insns per cycle ( +- 0.22% )
98,720 branches ( +- 0.20% )
95 faults ( +- 0.12% )
0 migrations ( +- 70.35% )
手册页中描述了 +- 8.93%
部分:
-r, --repeat=
repeat command and print average + stddev (max: 100). 0 means forever.
如果您不确定 stddev
的缩写是什么意思,它是 Standard Deviation(是的,也可能有更详细的手册页)。简而言之,结果与所有重复测量的差异有多大。值越小越好,但是如果你有这么小的问题(500k 指令),偏差会更大,因为缓存未命中可能是不确定的。
百分比 4.010 %
那么表示上面描述的 平均值 。
我使用了perf stat --repeat 100 -e cache-references,cache- misses,cycles,instructions,branches,faults,migrations ./avx2ADD
命令,输出如下。当缓存未命中百分比等于 4.010 %
时,cache-misses
的 +- 8.93%
是什么意思?
32,425 cache-references ( +- 0.54% )
1,300 cache-misses # 4.010 % of all cache refs ( +- 8.93% )
538,839 cycles ( +- 0.28% )
520,056 instructions # 0.97 insns per cycle ( +- 0.22% )
98,720 branches ( +- 0.20% )
95 faults ( +- 0.12% )
0 migrations ( +- 70.35% )
手册页中描述了 +- 8.93%
部分:
-r, --repeat=
repeat command and print average + stddev (max: 100). 0 means forever.
如果您不确定 stddev
的缩写是什么意思,它是 Standard Deviation(是的,也可能有更详细的手册页)。简而言之,结果与所有重复测量的差异有多大。值越小越好,但是如果你有这么小的问题(500k 指令),偏差会更大,因为缓存未命中可能是不确定的。
百分比 4.010 %
那么表示上面描述的 平均值 。