Hi Stephane,

Following your suggestions, I have modified PAPI to no longer use 
pfm_find_event().  This has eliminated the problems I was seeing when trying to 
use PFM_OS_PERF_EVENT_EXT through the PAPI API.  I have also restructured PAPI 
to separate the code paths used when listing events and when counting events.  
This has simplified both of these code paths quite a bit.  I currently only 
have this new code working in the perf_events component but I plan to also put 
the same modifications into the perf_events_uncore component.

While doing this work I found that PAPI needed two functions which exist in 
libpfm4 but were declared as static so they were not available to PAPI.  The 
functions are idx2pmu and pfmlib_idx2pidx.

The attached patch file modifies libpfm4 to make these two functions externally 
visible so that PAPI can use them.

Would be willing to commit this change to libpfm4 or should I replicate the 
source for these two functions in PAPI ?

If you would prefer to provide functions by different names which do the same 
thing, that would be fine with me (the existing names are not really the kind 
of name I would expect to find in a libraries API).

Let me know how you would like to handle this.

Thanks
Gary

Attachment: Libpfm4PmuFunctions.patch
Description: Libpfm4PmuFunctions.patch

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to