[$] Accurate timestamps for the ftrace ring buffer

Post Syndicated from original https://lwn.net/Articles/831207/rss

The function
tracer (ftrace) subsystem
has become an essential part of the kernel’s
introspection tooling. Like many kernel subsystems, ftrace uses a ring buffer to
quickly
communicate events to user space; those events include a timestamp to
indicate when they occurred. Until recently, the design of the ring buffer
has led to the creation of inaccurate timestamps when events are generated
from interrupt handlers. That problem has now been solved; read on for an
in-depth discussion of how this issue came about and the form of its
solution.