perf_event on the Raspberry Pi

If you are running kernels provided by the Raspberry-Pi Foundation (like those found with Raspian which are labeled for bcm2708/bcm2709) then performance counter support was added in the 3.18.8 kernel ( 1f58c41a5aba262958c2869263e6fdcaa0aa3c00) (for all versions, including Raspberry Pi 2).

If you are running upstream Linux (bcm2835/bcm2836) support for most Raspberry Pi machines was added in the 3.16 kernel as described below. Upstream support for the Raspberry Pi2 has not been tested.

The following document describes the process of getting perf_event working on the Raspberry Pi. The relevant patches should be included in the upstream kernel by the 3.16 release.

This work was done as part of an ECE599 independent study class at the University of Maine.

Raspberry Pi perf_event support: paradis_ece599.pdf

I might put the relevant patches here too at some point.

Previously I developed a kernel module to read out the counter values directly, without using perf. You can find that code here: raw kernel counter reading driver.
Back to the unofficial perf_event pages