Community
cancel
Showing results for 
Search instead for 
Did you mean: 
T_C
Beginner
47 Views

Events for measuring branch mispredictions?

I would like to measure the number of branch mispredictions (not specific to indirect/cond/ret etc). Do I understand the following two event counters correctly:

BACLEARS.ANY

​This will tell me exactly how many branch mispredictions occurred? (Probably the event counter I am really looking for)

 

BR_MISP_RETIRED.ALL_BRANCHES_PS

This will tell me how many instructions were executed/retired from a branch which was later determined to be mispredicted?

 

Do I have those correct? A BACLEAR signal is sent by the front-end to clear the pipeline when an execution unit detects a branch was mispredicted? Therefore BACLEARS.ANY will tell me how many branch mispredictions?

0 Kudos
1 Reply
Peter_W_Intel
Employee
47 Views

Mispredicted branch cost: (20* BR_MISP_RETIRED.ALL_BRANCHES_PS)/CPU_CLK_UNHALTED.THREAD
Threshold: Investigate if - 
Cost is ≥ .2

Please see <Tuning Guides and Performance Analysis Papers> here.

Reply