Files
rust/compiler/rustc_codegen_ssa
Jacob Pratt ebc3b52205 Rollup merge of #157681 - pmur:murp/add-instrument_fn-attr, r=oli-obk,mejrs
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
2026-06-16 22:10:30 -04:00
..
…

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.