title: Find source location where a branch was mispredicted
body: <p>I'm trying to find the positions in a function where branches are mispredicted most often. I gave perf a try, as follows:</p>
  
  <p><code>perf record ./a.out</code></p>
  
  <p><code>a.out</code> was compiled with options <code>-ggdb -fno-omit-frame-pointer</code>, as recommended by the manual.</p>
  
  <p>How can I find these spots?</p>