pad_anu
asked on
measuring cache misses for a C program
sir
can u specificy how to measure the cache misses for a C program
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The valgrind program does exactly what you're looking for. It simulates execution of your binary program, including the behavior of your instruction and data caches, and can produce a summary report for all the memory accesses made by the program.
Forgot the link: http://valgrind.org/
I'm not quite sure how valgrind can do all this, as there are sooo many different cache strategies in use, some secret.
Also valgrind isnt going to be able to simulate cache losses due the OS and interrupts taking up code and data cache space.
I'd suggest if you need really accurate results stick with the hardware counters.
Also valgrind isnt going to be able to simulate cache losses due the OS and interrupts taking up code and data cache space.
I'd suggest if you need really accurate results stick with the hardware counters.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
They're documented in Appendix A of:
ftp://download.intel.com/design/Pentium4/manuals/25366815.pdf
Really a whole lot of stuff.
ftp://download.intel.com/design/Pentium4/manuals/25366815.pdf
Really a whole lot of stuff.
ASKER
can I use VTune performance analyser tool to measure hardware performance counter
for C programs
for C programs
if you mean from within your own data structures then you can code some hit counters quite easily and then report on them before your application exits.
-P