====== 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 [[https://perfwiki.github.io/main/perf-tools-support-for-intel-processor-trace/|Intel Processor Trace]] and [[https://www.kernel.org/doc/html/latest/trace/coresight/coresight-perf.html|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: * rtla version 6.17 or higher * Linux kernel version 6.17 or higher, with BPF enabled * perf tool with Intel Processor Trace support **Currently, this guide only covers processor trace on Intel x86 platforms.** This method is also currently only supported with the //timerlat// tool.