I just wanted to mention the pmu-tools toolkit, which some people here may find useful. It's a collection of scripts and libraries to make it easier to use Intel specific PMU features on top of Linux perf.
Features in pmu-tools:
pmu-tools is on a rolling release, so there are no real releases per se. The git tree can be checked out at any time.
http://github.com/andikleen/pmu-tools
Cool stuff. Thanks a lot for sharing.
For more complete information about compiler optimizations, see our Optimization Notice.