Performance is key in any compute environment, and few utilities have as rich of a history in measuring performance as the perf tool in Linux. Here at Ampere, as we measure, predict, and model performance we often rely on tools such as perf to expose many aspects of system performance through perf events. Some of these events are vendor specific to the Ampere eMAG platform.

To enable developers to leverage these perf events on an eMAG system, Ampere has submitted patches to expose them in the upstream Kernel (tools/perf); these updates are expected to be available in the 4.19 release. On top of exposing functionality, these patches cover documentation of events both within the perf tool itself as well as through Ampere’s own developer site.

Upstream Contributions

These contributions to the kernel (tools/perf) can be seen in these patches:

  1. perf vendor events arm64: Enable JSON events for eMAG
    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=704089e77acf74b17ed294683660937000ecb9ee
  2. perf vendor events arm64: Revise core JSON events for eMAG
    https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf/core&id=d35c595bf0053b7df80ef9d44140ac5da6cc698b

Expanded descriptions to these events can be found in our eMAG Perf Event Guide located on our developer portal.

The 4.19 kernel release is expected to contain these patches.

Patching Tools/Perf to Support eMAG Perf Event Counters

We’ve hosted a quick how-to guide on patching the perf tool from the 4.18.y kernel with these changes. See the How To: Patch Tools/Perf to Enable Ampere Vendor Counters document for more details.

 

Written by: Travis Lazar



Get in contact with us:

By email: developer[at]amperecomputing.com
On the forums: https://developer.amperecomputing.com/community/