The perf command provides a subset of the common performance counter events for measuring such as processor clock cycles, number of commands, and cache event metrics. However, most processors provide many other implementation-related hardware events, such as floating-point operations and microarchitecture events (such as kiosks due to hardware resource limitations). To access these specific events, you must use the source event in perf (http://lxr.linux.no/#linux+v3.6/tools/perf/Documentation/perf-record.txt#L33), which can be tiring. libpfm4 provides a matching mechanism for referencing those hardware events associated with a particular implementation by name. libpfm is used by papi. You can see how papi uses libpfm to access these implementation-specific events (http://icl.cs.utk.edu/projects/papi/)
source share