作者:望奇迹般地神话 | 来源:互联网 | 2023-02-01 16:49
Linux内核:4.10.0-20-generic(也在4.11.3上试过)
Ubuntu:17.04
我一直试图使用收集内存访问的统计信息perf stat
.我能够收集内存存储的统计信息,但内存加载的计数返回0值.
以下是内存存储的详细信息: -
perf stat -e cpu/mem-stores/u ./libquantum_base.arnab 100
N = 100, 37 qubits required
Random seed: 33
Measured 3277 (0.200012), fractional approximation is 1/5.
Odd denominator, trying to expand by 2.
Possible period is 10.
100 = 4 * 25
Performance counter stats for './libquantum_base.arnab 100':
158,115,510 cpu/mem-stores/u
0.559922797 seconds time elapsed
对于内存加载,我得到0计数,如下所示: -
perf stat -e cpu/mem-loads/u ./libquantum_base.arnab 100
N = 100, 37 qubits required
Random seed: 33
Measured 3277 (0.200012), fractional approximation is 1/5.
Odd denominator, trying to expand by 2.
Possible period is 10.
100 = 4 * 25
Performance counter stats for './libquantum_base.arnab 100':
0 cpu/mem-loads/u
0.563806170 seconds time elapsed
我无法理解为什么这不恰当.我应该以任何方式使用不同的事件来获取正确的数据吗?