Skip to content

Add -Zpseudo-probe-for-profiling - #165492

Draft
apolloww wants to merge 1 commit into
rust-lang:mainfrom
apolloww:pseudo-probe-for-profiling
Draft

apolloww wants to merge 1 commit into
rust-lang:mainfrom
apolloww:pseudo-probe-for-profiling

Conversation

@apolloww

@apolloww apolloww commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Add unstable flag -Zpseudo-probe-for-profiling, same as Clang's -fpseudo-probe-for-profiling. This allows LLVM to emit pseudo probes.

As -Zdebuginfo-for-profiling is required by AutoFDO, -Zpseudo-probe-for-profiling is required by CSSPGO (context sensitive PGO). It provides better address to source (probe) correlation than line based AutoFDO.

The flag is rejected with -Cprofile-generate or -Cprofile-use, because it is specifically for sampling PGO.

The change follows how -Zdebuginfo-for-profiling was added.

Add the unstable flag `-Zpseudo-probe-for-profiling`, as Clang's
`-fpseudo-probe-for-profiling` does. This allows LLVM to emits
pseudo probes and pseudo probe descriptors in the `.pseudo_probe` and `.pseudo_probe_desc` sections.

As `-Zdebuginfo-for-profiling` is required by AutoFDO,
`-Zpseudo-probe-for-profiling` is required by CSSPGO (context sensitive
PGO). It provides better address to source (probe) correlation than line
based AutoFDO.

The flag is rejected with `-Cprofile-generate` and `-Cprofile-use`,
because it is specifically for sampling PGO.

The change follows how `-Zdebuginfo-for-profiling` was added.
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 5, 2026
@rustbot

rustbot commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @cuviper (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Please see the contribution instructions and our LLM policy for more information.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @cuviper

@apolloww
apolloww marked this pull request as draft November 6, 2026 00:28
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 6, 2026
@rust-bors

rust-bors Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants