What tools does the community use to help identify if cache misses are even a problem, and if they are a problem where they are occuring in the code?
The first question is:
How do I identify how much time is being spent waiting for data from main memory as a result of cache misses? Will a sampling profiler like OProfile attribute time to functions waiting on this data? For instance, they will not attribute time to functions waiting on data from disk reads, so one has to wonder if the same is true of waiting for data from memory.
The second question is: If I identify that cache misses are indeed a bottleneck, how do I identify what parts of the code are requesting the uncached memory? Should I use OProfile with LLC_MISSES as the event? Are there other tools that I don't know about? I prefer to stay away from proprietary solutions unless there is a compelling reason to use them, as I don't want to be locked into a certain toolchain in the future.
Thanks for you help!