tracepoint
also: trace point, kernel tracepoint
A lightweight instrumentation point in the Linux kernel that allows dynamic tracing of kernel events without modifying code or recompiling, enabling real-time observation of system behavior.
Tracepoints are static markers strategically placed throughout the Linux kernel code that can be dynamically enabled to log detailed information about kernel events as they occur. Unlike breakpoints, tracepoints have negligible performance impact when disabled and can be toggled on-the-fly without restarting the system.
Tracepoints work with the ftrace (function tracer) infrastructure and tools like trace-cmd and perf to capture detailed kernel activity. When enabled, a tracepoint executes a registered callback function that logs structured data about the event, such as system call arguments, memory allocation details, or scheduler decisions.
For example, enabling the sched:sched_switch tracepoint logs every context switch on the system, showing which process was running and which process took over. Developers and system administrators use tracepoints for performance analysis, debugging, and understanding system behavior without the overhead of full kernel instrumentation.