Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#5 exclude_guest field setting issue on Intel Xeon Phi

v1.0 (example)
open
nobody
None
5
2013-07-01
2013-07-01
No

As a driver for the Linux perf API, libpfm provides it with a perf_event_attr structure. Unfortunately, the structure available in the include/perfmon/perf_event.h file is not the same as the one in the linux header file (typically located in /usr/include/linux/perf_event.h).

As a matter of fact, on Intel Xeon Phi, the perf_event_attr returned by pfm_get_os_event_encoding is considered as an invalid argument in the perf_event_open callback, because some fields are wrongly set. I found out that setting the libpfm4.4's perf_event.h perf_event_attr.exclude_guest attribute to 0 before calling perf_event_open solves the problem. As it is presented as a reserved bit in the linux's structure counterparts, I consider it as a hack and therefore recommend to do something in order to fix it.

Discussion