Hi all, short version: Is it in theory possible to get 100% accurate result for BR_INST_RETIRED:ANY?
long version: I counted the retired branch instructions using perfmon 3.9 and --trigger-code-start-address and --trigger-code-end-address. Pfmon reports 136066642 retired branch instructions. However the result fluctuates a bit (~ 10 retired branches). I was curious whether this fluctuation is caused by the code or by inaccuracy in the performance counters. I instrumented the code by hand using appropriate assembler instructions. I inserted instructions which count the number of jmp/jne/... instructions executed at run time. It turned out that the added instructions count exactly 136066169 branch instructions. It does not fluctuate at all. To remove distortion by other processes I pinned all running processes to one core. Next I executed pfmon on a different core. I also disabled memory address randomization. Did not change the result at all. So: Is it possible to get a 100% accurate performance counter result (in theory) (for BR_INST_RETIRED:ANY)? Which are the factors distorting the results? Is it possible to get rid of them completely? I read Vince's paper "Can Hardware Performance Counters be Trusted?" and have two more in the queue. Any special recommendations of papers trying to get 100% accurate performance counter results? And one last thing: Using --trigger-code-start|stop-address I measured the retired instructions for a small piece of code. This piece did not contain any branches. However pfmon consistently reported 1 retired branch instruction. Cause: superscalar execution? Thanks Marc ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel