1 of 1 people found this helpful
IC fetch rate = IC fetches / Retired instructions
IC miss rate = IC misses / Retired instructions
IC miss ratio = IC misses / IC fetches
The calculations are normalized by the event counts. For example, if you used the "Investigate instruction access" configuration, the Retired instructions event takes a sample every 250000 events, but the IC misses event takes a sample every 25000 events.
What profile configuration, CodeAnalyst version, and CPU family did you use to get the sample counts? Those calculations look wrong.
Actually, I think I know what's going on.
The numbers that I gave in the post are for the entire process. If I expand the the tree all the way I could see that the calculations for individual lines look good (just like your formula) but the aggregates (function, process) are all wrong.
The problem seems to be the way CodeAnalyst aggregates individual lines. Currently, it sums up everything, both raw counters (IC fetches, IC misses) and calculated values (IC fetch rate, IC miss rate, IC miss ratio). Instead, it should sum up raw counters and re-apply the formulas for calculated values.
Put in math language, Code Analyst is doing this:
AggregateValue = x1/y1 + x2/y2 + ... + xn/yn
What it should be doing is:
AggregateValue = (x1 + x2 + ... + xn) / (y1 + y2 + ... + yn).
I hope it makes sense.