User Tools

Site Tools


realtime:documentation:howto:tools:rtla:processor_trace

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:

  • latencies outside the kernel (firmware-side NMIs, SMIs)
  • latencies coming from unpredictable, or untraceable parts of the Linux kernel (e.g. contention in early IRQ code)

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.

realtime/documentation/howto/tools/rtla/processor_trace.txt · Last modified: 2025/12/05 10:31 by tglozar