IT lexicon › Programming › Pseudo probe

Pseudo probe

Programming På svenska → Updated: 2026-11-07

A per-block marker the compiler carries through optimization so that a sampling profile can be mapped back to the right place in the code.

Sampling-based PGO such as AutoFDO ties samples to source lines through debug info. After heavy optimization that's shaky: lines get merged, duplicated or dropped, and the profile points at the wrong thing. Pseudo probes are pseudo-instructions with their own ID per block and call site. They emit no machine code, but the optimizers have to keep track of them, and their addresses end up in a dedicated section of the binary.

Meta developed the technique around 2020–2021 for LLVM's context-sensitive sample PGO, CSSPGO. The price is that probes block a few code motions. The bet is that a slightly less optimized binary with an accurate profile beats a perfect binary with a profile that's guessing.

← Back to the lexicon