Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you are running Intel hardware, then VTune for Linux is probably the best and most full-featured tool available to you.</p> <p>Otherwise, you may be obliged to read the performance-counter MSRs directly, using the <a href="http://sourceforge.net/projects/perfctr/" rel="nofollow noreferrer">perfctr</a> library. I haven't any experience with this on Linux myself, but I found a couple of papers that may help you (assuming you are on x86 -- if you're running PPC, please reply and I can provide more detailed answers): <a href="http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/11169/35961/01704008.pdf?temp=x" rel="nofollow noreferrer">http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/11169/35961/01704008.pdf?temp=x</a> <a href="http://www.cise.ufl.edu/~sb3/files/pmc.pdf" rel="nofollow noreferrer">http://www.cise.ufl.edu/~sb3/files/pmc.pdf</a></p> <p>In general these tools can't tell you exactly which lines your cache misses occur on, because they work by polling a counter. What you will need to do is poll the "l1 cache miss" counter at the beginning and end of each function you're interested in to see how many misses occur inside that function, and of course you may do so hierarchically. This can be simplified by <em>eg</em> inventing a class that records the start timer on entering scope and computes the delta on leaving scope.</p> <p>VTune's instrumented mode does this for you automatically across the whole program. The equivalent AMD tool is CodeAnalyst. <a href="http://valgrind.org/" rel="nofollow noreferrer">Valgrind</a> claims to be an open-source cache profiler, but I've never used it myself.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload