fre*_*ddy 1 caching linux-kernel
我正在对过程进行概要分析。我必须分析cpu时间,I / O阻塞时间..和缓存未命中数。但是我不知道如何获得缓存未命中。我正在分析内核源代码,但我不知道该怎么做。我知道关于运行队列的源代码在哪里。如何获取进程的高速缓存未命中数?我认为这可能是具体问题或技术问题。因此,如果您不愿意直接回答,请给我一些提示或推荐有关如何获取未命中的缓存数量的书。直接回答是最好的。先感谢您。
perf,cachegrind,oprofile,PTU,CodeAnalyst和Zoom是一些选项
perf stat \
--repeat 10 \
-e cycles:u \
-e instructions:u \
-e l1-dcache-loads:u \
-e l1-dcache-load-misses:u \
-e l1-icache-loads:u \
-e l1-icache-load-misses:u \
-e llc-loads:u \
-e llc-load-misses:u \
a.out
Run Code Online (Sandbox Code Playgroud)
perf选项:https://perf.wiki.kernel.org/articles/t/u/t/Tutorial.html