PAPI Performance VS My Perf Version

81 views
Skip to first unread message

Khaled Z Mahmoud

unread,
Nov 29, 2020, 3:50:57 AM11/29/20
to ptools-...@icl.utk.edu
Hi,


I am reading performance counters in a multithreaded application ever 1ms.
I realized using pure Perf, there is an 4x overhead. With PAPI, there is almost no overhead.


My Perf Implementation Looks Like the following:

Fds = …..

For every open event:
read(event.file_description … rest of params)

Any ideas ?

Is PAPI implementation generally of more superior performance than Per ? I know PAPI is built on top of perf.

Any suggestion ?



Regards,
Khaled Mahmoud

Vince Weaver

unread,
Nov 29, 2020, 3:22:39 PM11/29/20
to Khaled Z Mahmoud, ptools-...@icl.utk.edu
On Sun, 29 Nov 2020, Khaled Z Mahmoud wrote:

> I am reading performance counters in a multithreaded application ever 1ms.
> I realized using pure Perf, there is an 4x overhead. With PAPI, there is almost no overhead.

you're probably seeing the difference of PAPI using the rdpmc instruction.
You can read more about that here:
http://web.eece.maine.edu/~vweaver/projects/papi-rdpmc/


Khaled Z Mahmoud

unread,
Nov 29, 2020, 3:45:22 PM11/29/20
to Vince Weaver, ptools-...@icl.utk.edu
Hi,

Thanks a lot for reply. 
Actually I using perf for my 32-bit project because I am getting runtime and compilation errors with PAPI.  PAPI works like a charm for my other 64-bit project.

Can you point me to an example where I can use perf with rdpmc ?

Khaled Z Mahmoud

unread,
Nov 29, 2020, 6:06:37 PM11/29/20
to Vince Weaver, ptools-...@icl.utk.edu
There is an example in perf_exampled/self_count.c

Is this how PAPI does redcap invocations ?
Reply all
Reply to author
Forward
0 new messages