|
[perfmon2] linking libpfm4 with perf
From: stephane eranian <eranian@go...> - 2012-09-20 21:36
|
Hi,
It's been a recurring question so I decided to commit some code to enable
using libpfm4 with perf to get full symbolic event naming.
Since perf-3.4.0, a new cmdline event parser has been implemented. This is
a full flex/bison based parser with a brand new syntax, e.,g,
cpu/event=0x3c,umask=0x1/.
Fitting libpfm4 symbolic events within this syntax is very hard and I
stopped wasting
time trying to do this. I did talk with Arnaldo about this. The
suggestion was to create
my own option instead of trying to fit this within the existing -e
option. So that's what
I did. I added the --pfm-events option. You can still mix and match -e
and --pfm-events.
With the patch, you can now say:
$ perf record --pfm-events unhalted_core_cycles:u:period=1000000 ....
$ perf stat --pfm-events uops_retired:any:c=1:i .....
The patch is relative to a specific kernel version and has been included in the
source tree of the Gooda analyzer which uses perf record to collect samples.
The gooda-analyzer (and visualizer) are both open-source projects available
from:
http://code.google.com/p/gooda
The perf libpfm4 patches relative to recent kernel versions are
available in the git tree:
http://code.google.com/p/gooda/source/browse/#git%2Fgooda-analyzer%2Fperf-patches
You only need to apply the first patch:
$ git am < 0001-*
For use with Gooda, you need to apply both patches.
Enjoy,
|
| Thread | Author | Date |
|---|---|---|
| [perfmon2] linking libpfm4 with perf | stephane eranian <eranian@go...> |