2 ms·
You can get a lot of the same data (as seen in the examples) with libpfm4 (http://perfmon2.sourceforge.net/ http://perfmon2.sourceforge.net/). CPU Performance c
by nkurz 14y ago
You can get a lot of the same data (as seen in the examples) with libpfm4 (http://perfmon2.sourceforge.net/ http://perfmon2.sourceforge.net/). CPU Performance counters can give you a lot of this data with much lower run-time overhead, and a lot less work.
What's the preferred way of using libpfm4? I've ended up using it's sample program as a way to convert from readable counter names to hex to put into a perf command line. I've found several defunct patches to give perf this functionality directly, and am confused why this seemingly essential functionality is left out.
What I'd like is the ability to measure just sections of code, and access to all available counters without needing to copy-and-paste hex. I'm getting the sense that perf is not the tool for this:
http://lwn.net/Articles/441209/ http://lwn.net/Articles/441209/
http://www.mail-archive.com/linux-perf-users@vger.kernel.org/msg00789.html http://www.mail-archive.com/linux-perf-users@vger.kernel.org...
Is Likwid a viable option? https://code.google.com/p/likwid/ https://code.google.com/p/likwid/
- lallysingh 14y agoI wrapped the perf_event syscall with something easier to use, and just call it directly around the code I care about.