Page 1 of 1
papi/perfctr or vtune ?

Posted:
Thu Feb 02, 2012 7:41 pm
by stardust
Hello,
I would like to understand if/how PAPI+perfctr is different from vtune and what are the advantages of using it over vtune? (I have a linux x86_64 system)
I downloaded and installed PAPI (but have not yet gotten to patching perfctr). The included documentation and other information that I found on the website do not help me in understanding the above.
Many Thanks!
Re: papi/perfctr or vtune ?

Posted:
Thu Feb 02, 2012 8:10 pm
by danterpstra
Vtune measures performance events across the entire cpu. PAPI measures performance events from the perspective of your application. For example, PAPI can answer the question: "How many FLOPS occured in this subroutine.
If your linux kernel is more recent than 2.6.32, you don't need to patch it. Just configure and make. There's built-in performance counter support.
Re: papi/perfctr or vtune ?

Posted:
Fri Feb 03, 2012 6:07 am
by stardust
I read some about PAPI virtualizing the h/w/counters on a per process basis. I do not yet know what this really means. Is there some overhead to doing so?
vtune also has a api that allows you to start and stop counter measurements in your code (so for eg you could start it everytime you start a subroutine and stop at the end).
Thanks.
Re: papi/perfctr or vtune ?

Posted:
Fri Feb 03, 2012 11:02 am
by danterpstra
Basically, every time there's a context switch, the counters are saved along with all the other state. This does imply a small additional overhead during context switch, but it's negligible and not attributed to your application. Vtune may now be able to start and stop counters, but I believe it still counts system-wide. Although that, too, may have changed with the introduction of counter support within the kernel. If you can guarantee pretty much exclusive access to a core, the counts shouldn't be terribly different.