I know that I can use gprof to benchmark my code.
However, I have this problem -- I have a smart pointer that has an extra level of indirection (think of it as a prox
Linux supports with perf from 2.6.31 on. This allows you to do the following:
perf record -e LLC-loads,LLC-load-misses yourExecutableperf report
LLC-load-misses line, annotate. You should see the lines (in assembly code, surrounded by the the original source code) and a number indicating what fraction of last level cache misses for the lines where cache misses occurred.