سؤال

For testing a cache system, I need the memory access (read and writes) list for a particular process. The cache code is written in verilog. My application is for media processing, however I'm open to other applications as well.. So far I have been adding address references in the C++ code for PNG decoding (available here http://lodev.org/lodepng/)...

This is quite a tedious process and I'm looking for alternatives. I've even tried hacking into benchmarks like simplescalar as well as reading crash dumps, but to no avail...

Thanks in advance!

هل كانت مفيدة؟

المحلول

It might be worth your time to look into Intel's Pin, so long as you're running on x86.

Their manual has an example how to use Pin to instrument a binary to generate a memory trace.

نصائح أخرى

Take a look at https://lwn.net/Articles/257209/

One tool is Cachegrind (part of valgrind). It's slow, but can tell you exact stats about memory accesses because it simulates your entire program on a virtual processor.

Another tool is Oprofile. It's a kernel module that uses statistical sampling to get data. It's not as accurate, but much lighter weight.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top