有什么方法可以在Linux内核中分析缓存未命中吗? [英] Are there any way to profile cache miss in linux kernel?

查看:387
本文介绍了有什么方法可以在Linux内核中分析缓存未命中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对过程进行概要分析. 我必须分析cpu时间,I/O阻塞时间..和高速缓存未命中数. 但我不知道如何获取缓存未命中. 我正在分析内核源代码,但我不知道该怎么做.我知道关于运行队列的源代码在哪里. 如何获取进程的高速缓存未命中数? 我认为这可能是具体问题或技术问题. 因此,如果您不愿意直接回答,请给我一些提示或推荐有关如何获取未命中的缓存数量的书. 直接回答是最好的. 预先谢谢你.

I am doing profiling of a process. I have to profile cpu time,I/O blocking time .. and # of cache misses. But I don't know how to get cache misses. I am analysing kernel source code, but I don't know how to do. I know where source code about run queue is. How can I get number of cache misses of a process? I think it may be specific or technical question. So, If you hesitate answering directly, please give me some hints or recommend book about how to get number of caches misses. Answering directly is BEST. Thank you in advance.

推荐答案

perf cachegrind PTU CodeAnalyst

perf, cachegrind, oprofile, PTU, CodeAnalyst, and Zoom are a few options

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

性能选项: https://perf.wiki.kernel .org/articles/t/u/t/Tutorial.html

这篇关于有什么方法可以在Linux内核中分析缓存未命中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆