Text of rust.docs.kernel.org › next › kernel › macro.declare_trace.html as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

declare_trace in kernel - Rust

Skip to main content declare_trace kernel Macro declare_ trace Source macro_rules! declare_trace { ($($(#[$attr:meta])* $pub:vis unsafe fn $name:ident($($argname:ident : $argtyp:ty),* $(,)?);)*) => { ... }; } Expand description Declare the Rust entry point for a tracepoint. This macro generates an unsafe function that calls into C, and its safety requirements will be whatever the relevant C code requires. To document these safety requirements, you may add doc-comments when invoking the macro.