Is there a way to identify between two code execution points, like for example start and end of a program how many cycles were impacted because of cache misses and branch mispredicts.
I want to understand if the number is meaningful for my application. My application finishes a performance sensitive task in 100ms and I want to know if the total impact of missed caches and mispredicts even comes to let's say 10ms.
FYI, I know of RESOURCE_STALL.BR_MISS_CLEAR -- this is a good general counter. Is there an equivalent for L1D and L2 cache misses also I couldn't find one .. maybe I have to construct one using the ones available, and any help here is appreciated.