c++ - Linux C++ : how to profile time wasted due t

我知道我可以使用 gprof 对我的代码进行基准测试。

但是,我遇到了这个问题——我有一个智能指针,它具有额外的间接级别(将其视为代理对象)。

因此,我有了这个额外的层,它影响了几乎所有的功能,并带有缓存。

有没有办法测量我的 CPU 因缓存未命中而浪费的时间?

最佳答案

你可以试试cachegrind而且是前端的kcachegrind。

关于c++ - Linux C++ : how to profile time wasted due to cache misses?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2486840/

相关文章:

php - 在 PHP/Apache/Linux 环境中,为什么 chmod 777 是危险的?

linux - Linux 中的直接内存访问

node.js - Ansible 将以什么用户身份运行我的命令?

linux - 如果我们想在版本化的源代码中搜索,使用 git grep 比使用普通 grep 更好

regex - shell脚本中 "=~"运算符的含义

linux - 用户数据脚本未在我的自定义 AMI 上运行,但在标准 Amazon linux 中运

python - 编译 python 时 --enable-optimizations 做了什么?

linux - 如何删除 Mercurial 存储库

c++ - 如何在 GDB 中漂亮地打印 STL 容器?

linux - 自动化 Amazon EBS 快照 任何人在 linux 上都有一个好的脚本或解决方