Evolving ftrace on arm64
The Linux kernel’s ftrace mechanism makes it possible to dynamically attach hooks to kernel functions, and can be used for a variety of purposes including tracing, debugging, and live-patching.
The low-level details of ftrace differ by architecture, and recently the arm64’s ftrace implementation has evolved substantially with the implementation of DYNAMIC_FTRACE_WITH_ARGS and DYNAMIC_FTRACE_WITH_CALL_OPS, which enable richer, lower overhead tracing with relatively simple and
maintainable architecture code.
This walk will cover the low-level details of arm64’s ftrace implementation, how it works, and why certain design choices were made.
Mark Rutland
Mark is a Linux kernel engineer at Arm, working on the arm64 kernel port and
related bits and pieces. He often works at the boundary between architecture
code and core code, with cross-architecture work in perf_events, atomics, and ftrace.