Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4998 Discussions

Events for measuring branch mispredictions?

T_C
Beginner
257 Views

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
257 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.

0 Kudos
Reply