Stephane,

Attached is a libpfm4 patch for Intel x86 systems to export the constraint 
masks when doing a pfm_get_event_info() call.  With this change, I have been 
able to get the papi_native_avail tool to show the counter constraints at both 
the event and umask level.  I currently works for core events but not for 
uncore events.

I wanted to pass this by you to see if it satisfies your “portable and backward 
compatible” requirements.
If so I will extend it to also handle the Intel uncore events.


One other question.  I have been able to get PAPI to use 
“PFM_OS_PERF_EVENT_EXT” to get support for the cpu mask provided with this 
mode.  When this effort was started you provided me with a libpfm4 patch file 
(copy attached) which looks like it adds the cpu mask to the this mode.  It 
appears to me like this patch is not yet committed to the head of your GIT.  
Will you be able to commit this patch so that the next time PAPI pulls a new 
libpfm4, the cpu mask will be included in the extended mode.

Thanks
Gary

My todo list has one other thing that may affect libpfm4.  I would like be able 
to create an event list which includes the counter register constraints for the 
events and/or umasks (when there are constraints).  I see the information 
already exists in the libpfm4 event tables, but I see no way to get the 
information back from libpfm4.  Perhaps these values could be added as a new 
field in the information structures returned from the pfm_get_event_info and 
pfm_get_attr_info function calls.

There is currently no way to extract that constraint mask. If it were 
implemented it would be via the existing pfm_get_event_info() call. I'd like to 
avoid
adding yet another call just for that.
The reason it is not yet exposed is because nowadays on Linux it is irrelevant 
because ultimately controlled by the kernel.
Even though the user could know, it would have only a small influence on the 
actual scheduling, except on a single user
machine.

Exposing this also assumes that the constraints can always be expressed as a 
simple bitmask. Some events have more dynamic constraints
which depend on what is measured on the other sibling CPUs for instance 
(offcore_response_* events).

I agree though that the info could help with grouping of events, should you 
need this for some measurements.



It would be nice if the user could see the counter constraints without having 
to go find the intel/amd/??? manuals.  I understand that the counter 
constraints are actually enforced by the kernel and not libpfm4 but being able 
to provide this information to the user would help them determine which events 
can be used together.  With the newer kinds of hardware, counter constraints 
are becoming more common so I think additional help for the user in this area 
is a good idea.

Thoughts ??

Make a patch proposal to add this.
Needs to be portable and backward compatible with what is already there.

Attachment: CounterMask_libpfm4.patch
Description: CounterMask_libpfm4.patch

Attachment: 0001-activate-perf_event_ext-cpu-modifier.patch
Description: 0001-activate-perf_event_ext-cpu-modifier.patch

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to