mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 17:48:43 +00:00
Add instrument_fn attribute This attribute enables or disables function instrumentation when using `-Zinstrument-xray` or `-Zinstrument-mcount`. It supports the following usage: `#[instrument_fn = "on|off"]` For XRay, "on" is equivalent to always instrument, and "off" is equivalent to never instrumenting. For mcount, "on" has no effect. "off" disables instrumentation of the function. This is tracked by rust-lang/rust#157081, and related to the pending rfc rust-lang/rfcs#3917, and earlier as part mcp rust-lang/compiler-team#561
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.