Community support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
4887 Discussions

Performance counters acting weird...


My problem doesn't really involve VTune, but it's something that VTune experts might be able to help me with:

I'm having a problem getting consistent results when accessing the performance counters directly (i.e. without using VTune). I've found that the results of event counting change depending on what I count first. i.e. I initialize the ESCRs and CCCRs to count ITLB misses (through a driver IO control at the beginning of my program), and then read the counter at different points during execution. I then repeat this for Level 1 Cache misses. Now, if I reverse the process (by doing Cache misses before ITLB misses), I get very different results for both. Note that the counters/CCCRs/ESCRs used for these two events are different.

Is there anything I should be doing before initializing a new event counter? I've tried clearing all the performance MSRs between each run, but it doesn't do any good. Also, the addresses and contents of each MSR is configured the same way they are in VTune (the values found by clicking on "Edit Event"), so that shouldn't be the problem.

I've noticed that VTune re-runs the applcation every time it counts for a new event, and VTune's results seem independant of order. Does VTune do something "special" between each run to isolate the results?

Thank you for any help.
0 Kudos
0 Replies