I am trying to use hardware performance counter to track which branch firefox is taking
during execution. The event I am using is TAKEN sub-event in
BR_INST_RETIRED. And the tool I am using is Linux perf.
In firefox, there is a piece of code like
After compiling, the related binary codes looks like:
cmp 0x0, flag
By loading a special web-page, only if branch is executed. But from
the perf report, I find the "je " also causes
BR_INST_RETIRED TAKEN event. I have add some fprintf into both if and
else branch, and I am pretty sure that only if branch is executed.
So this problem is caused by "skid"? or some other reasons causing
this problem? I can get which instruction causedBR_INST_RETIRED TAKEN from hardware performance counter, right?