admin管理员组文章数量:1133746
I have a microbenchmark which I'm using to generate memory traffic. I've profiled the application and it seems to constantly hit in L1 cache. I have a Core i5-7260U.
I want to understand the actual memory access pattern by tracing the memory accesses of my app. I think Valgrind can do this but a Google search hasn't shown any results. Is there a way to use Valgrind to trace all memory accesses?
It's a simple C++ program that I'm compiling using gcc with -g and -O3.
I have a microbenchmark which I'm using to generate memory traffic. I've profiled the application and it seems to constantly hit in L1 cache. I have a Core i5-7260U.
I want to understand the actual memory access pattern by tracing the memory accesses of my app. I think Valgrind can do this but a Google search hasn't shown any results. Is there a way to use Valgrind to trace all memory accesses?
It's a simple C++ program that I'm compiling using gcc with -g and -O3.
Share Improve this question edited Jan 8 at 4:52 Peter Cordes 363k49 gold badges702 silver badges966 bronze badges asked Jan 7 at 23:14 jkangjkang 5497 silver badges22 bronze badges1 Answer
Reset to default 2Answering for anyone else wondering this:
valgrind has a tool called lackey (https://valgrind.org/docs/manual/lk-manual.html) which has an option --trace-mem=yes
that will perform a memory trace:
valgrind --tool=lackey --trace-mem=yes --log-file=<log file> <app>
本文标签: Getting a trace of memory address accesses using ValgrindStack Overflow
版权声明:本文标题:Getting a trace of memory address accesses using Valgrind - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736769365a1952001.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论