Skip to content

Rename -Zdebuginfo-for-profiling switch#156887

Open
zamazan4ik wants to merge 2 commits into
rust-lang:mainfrom
zamazan4ik:rename-debuginfo-for-profiling-switch
Open

Rename -Zdebuginfo-for-profiling switch#156887
zamazan4ik wants to merge 2 commits into
rust-lang:mainfrom
zamazan4ik:rename-debuginfo-for-profiling-switch

Conversation

@zamazan4ik
Copy link
Copy Markdown

The PR was raised from this comment from another stabilization PR: #155942

I renamed -Zdebug-info-for-profiling into -Zdebuginfo-for-profiling before stabilization to be consistent with other debuginfo-related Rustc flags like -C split-debuginfo and -C debuginfo.

One important note is that Clang has the flag under -fdebug-info-for-profiling. I decided that consistency with other Rustc flags is more important here than to be consistent with Clang.

r? folkertdev (as was proposed here)

@rustbot rustbot added 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 May 24, 2026
@rustbot

This comment has been minimized.

@zamazan4ik zamazan4ik force-pushed the rename-debuginfo-for-profiling-switch branch from 1c4094e to 58d2a68 Compare May 24, 2026 18:21
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 24, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@zamazan4ik zamazan4ik force-pushed the rename-debuginfo-for-profiling-switch branch from 58d2a68 to 57e7bf4 Compare May 24, 2026 19:18
@folkertdev
Copy link
Copy Markdown
Contributor

Neat! you can rebase the other PR once this merges and then we'll nominate it.

In the meantime, can you clean up the stabilization report over there a bit? the text from the template in quote blocks just makes the report longer for no reason, e.g. the tooling section is irrelevant, etc. The process will go faster if you can succinctly describe what we're actually dealing with.

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 25, 2026

📌 Commit 57e7bf4 has been approved by folkertdev

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 25, 2026
@zamazan4ik
Copy link
Copy Markdown
Author

zamazan4ik commented May 25, 2026

Neat! you can rebase the other PR once this merges and then we'll nominate it.

Sure, will do it.

In the meantime, can you clean up the stabilization report over there a bit? the text from the template in quote blocks just makes the report longer for no reason, e.g. the tooling section is irrelevant, etc. The process will go faster if you can succinctly describe what we're actually dealing with.

Sure, no problem. To be honest, I wanted to do it from the start, but in the Stabilization report template there are the following lines:

Not all parts of the template will apply to every stabilization. If a question doesn’t apply, explain briefly why. Copy everything after the separator and edit it as Markdown. Replace each TODO with your answer.

I've interpreted it as "Copy the whole template, remove nothing from template since it can potentially hide something useful for reviewers, place some N/A comments for non-applicable sections". But if I am wrong in my understanding and reviewers are okay with removing unnecessary parts - I'll happily do the refactoring of the report with removing useless stuff and explaining a bit more some missing details.

Thanks a lot for the review!

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 25, 2026
…ofiling-switch, r=folkertdev

Rename `-Zdebuginfo-for-profiling` switch

The PR was raised from this [comment](rust-lang#155942 (comment)) from another stabilization PR: rust-lang#155942

I renamed `-Zdebug-info-for-profiling` into `-Zdebuginfo-for-profiling` before stabilization to be consistent with other `debuginfo`-related Rustc flags like `-C split-debuginfo` and `-C debuginfo`.

One important note is that Clang has the [flag](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fdebug-info-for-profiling) under `-fdebug-info-for-profiling`. I decided that consistency with other Rustc flags is more important here than to be consistent with Clang.

r? folkertdev (as was proposed [here](rust-lang#155942 (comment)))
rust-bors Bot pushed a commit that referenced this pull request May 25, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #156900 (stdarch subtree update)
 - #156887 (Rename `-Zdebuginfo-for-profiling` switch)
 - #156901 (compiletest: Simplify `//@ needs-asm-mnemonic: ret` to just `//@ needs-asm-ret`)
@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors r-
#156907 (comment)

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 25, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 25, 2026

This pull request was unapproved.

This PR was contained in a rollup (#156907), which was unapproved.

View changes since this unapproval

@folkertdev
Copy link
Copy Markdown
Contributor

Hmm, is it just a target issue (x86_64 behaves differently from aarch64)? We might need to pin the target using --target = ... and use minicore (see other tests) so that we can run it from anywhere

@zamazan4ik
Copy link
Copy Markdown
Author

Aha, seems like discriminator-based test is architecture-dependent and the amount of emitted discriminators depends on the target platform.

I can perform tests by myself for x86-64 and ARM architectures and limit the test only for these two archs. Is it okay to resolve this error in this way or we need a more generic solution to test on all architectures somehow?

@zamazan4ik
Copy link
Copy Markdown
Author

Hmm, is it just a target issue (x86_64 behaves differently from aarch64)? We might need to pin the target using --target = ... and use minicore (see other tests) so that we can run it from anywhere

Sure, will do it. Do I need to pin to just one architecture or we can enable the test on both - aarch64 and x86-64 as for the most commonly used nowadays.

@folkertdev
Copy link
Copy Markdown
Contributor

you can specify a target per revision, so you'd get

//@ revisions: DEFAULT-X86 DEFAULT-AARCH64 DEBUGINFO_FOR_PROFILING-X86 DEBUGINFO_FOR_PROFILING-AARCH64

etc. Just those targets is fine for now I think, really we're just testing that the flag has an effect.

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

Labels

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.

5 participants