Using rtla with perf processor trace

The rtla tool allows extensive tracing using the capabilities of tracefs subsystem, specifically, tracepoints. Those can be used to track various latency-related events, including IRQs, thread interference, scheduling delays, IPIs, and so on.

Tracepoints trace specific points inside the Linux kernel, and as such, they fail to reveal the latency source in two cases:

On some CPUs, namely some models of Intel x86 and ARM architectures, a feature called processor trace is available. This feature allows one to trace, without extra overhead, all instructions that are executed in a time period, and collect them into a ringbuffer.

On Linux, this feature is supported by perf's Intel Processor Trace and CoreSight support. Using actions, rtla is able to call perf and capture all instructions that were executed during a latency measurement cycle when tracing is stopped.

Prerequisites

To use rtla with processor trace, you need:

Currently, this guide only covers processor trace on Intel x86 platforms. This method is also currently only supported with the timerlat tool.