I want to understand branch prediction behavior of a program I work on. For this, I use the perf tool. I recorded with:
perf record -e branches,branch-misses
and visualizing it with
perf report --hierarchy -M intel
I get results, but I don't understand how to interpret them. I have percentages in the left column, but instead of branches, mispredictions happen on normal instructions, for example, add rax, rcr, or move rsi QWORD PTR [r14+0x8], etc.
What does it mean? How is it possible for mispredictions happen in these places? How to interpret them.