主机:ubuntu 15.04
oprofile 版本:1.1.0
CPU:英特尔至强 D-1520
1.
./ocount --events=INST_RETIRED,LLC_MISSES,LLC_REFS ./test
结果是:
Event Count % time counted
INST_RETIRED 1,847,242,162 100.00
LLC_MISSES 306,616,715 100.00
LLC_REFS 306,616,715 100.00
和相同LLC_MISSES
,LLC_REFS
表示缓存丢失率为 100%。为什么会这样?对我来说它看起来不正确。
我operf
用来做测试:
sudo operf -e INST_RETIRED:2000003 -e LLC_MISSES:10000 -e LLC_REFS:10000 -e l1d_replacement:2000003 ./test
INST_RETIRED:2...|l1d_replacemen...| LLC_MISSES:10000| LLC_REFS:10000|
samples| %| samples| %| samples| %| samples| %|
------------------------------------------------------------------------
929 100.000 132 100.000 13083 100.000 13083 100.000 test
INST_RETIRED:2...|l1d_replacemen...| LLC_MISSES:10000| LLC_REFS:10000|
samples| %| samples| %| samples| %| samples| %|
------------------------------------------------------------------------
927 99.7847 132 100.000 13046 99.5721 13046 99.7172 test
L1D
是比较公平的。但是,LLC ( Last Level Cache )
缓存未命中率与ocount
100% 相同。
我还没有找到根本原因,如果您知道原因或如何解决此问题,请分享您的经验。
谢谢