Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend -Cdebuginfo with new options and named aliases #83947

Closed
wants to merge 2 commits into from

Conversation

jdtatz
Copy link
Contributor

@jdtatz jdtatz commented Apr 6, 2021

The -Cdebuginfo=1 option was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for emitting line tables only was added. Additionally an option for emitting line info directives only was added, which is needed for some targets, i.e. nvptx. The debug info options should now behave similarly to clang's debug info options.

Fix #60020
Fix #64405

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @lcnr (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 6, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor

lcnr commented Apr 12, 2021

not something i am familiar with, maybe

r? @nagisa

@rust-highfive rust-highfive assigned nagisa and unassigned lcnr Apr 12, 2021
@nagisa
Copy link
Member

nagisa commented Apr 12, 2021

This overall seems good to me, but it should be accompanied with some tests I think.

@jdtatz
Copy link
Contributor Author

jdtatz commented Apr 23, 2021

This overall seems good to me, but it should be accompanied with some tests I think.

One issue with at the moment is that debug-info tests are not being ran #47163

@nagisa
Copy link
Member

nagisa commented Apr 24, 2021

The test could be a codegen test verifying the kind of settings LLVM receives and the kind of debug info statements that do or do not show up in the IR. I suspect, for instance, that the optimized IR does not need to contain any @llvm.dbg.declarecalls when just line-tables/directives are being emitted.

(Also see https://rustc-dev-guide.rust-lang.org/tests/intro.html if you haven't yet)

@bors

This comment has been minimized.

@bors

This comment has been minimized.

@nagisa
Copy link
Member

nagisa commented May 26, 2021

Sorry for taking so long to take another look at this!

This looks great, but there is a test failure that needs to be fixed :(

Could you also squash the commits together into 1 or 2 while removing commits such as "Formatting"? Thanks!

@pnkfelix pnkfelix added I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 27, 2021
@nagisa
Copy link
Member

nagisa commented May 28, 2021

During the meeting we had on Thrusday a number of T-compiler members have expressed that they would like to see an MCP for this change. However given that this is already implemented, we could also run an FCP, wdyt @pnkfelix @michaelwoerister?

@michaelwoerister
Copy link
Member

Question: What exactly is "line-directives-only"?

@crlf0710 crlf0710 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 Jun 26, 2021
@crlf0710
Copy link
Member

@jdtatz Ping from triage, CI is still red. Would you mind fixing that? Thanks!

@JohnCSimon
Copy link
Member

@jdtatz Ping again from triage, build is still broken.

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Aug 19, 2021
@rfcbot
Copy link

rfcbot commented Aug 19, 2021

🔔 This is now entering its final comment period, as per the review above. 🔔

@wesleywiser wesleywiser 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-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Aug 26, 2021
@apiraino
Copy link
Contributor

The main thing blocking this from landing, from the viewpoint of T-compiler, is the need for improvements to the documentation, especially user-facing stuff.

cc @jdtatz in case the previous notification went lost

@rustbot label -S-waiting-on-team +S-waiting-on-author

@rfcbot rfcbot added the finished-final-comment-period The final comment period is finished for this PR / Issue. label Aug 29, 2021
@rfcbot
Copy link

rfcbot commented Aug 29, 2021

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@rfcbot rfcbot added to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Aug 29, 2021
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Sep 2, 2021
`-Cdebuginfo=1` was never line tables only and
can't be due to backwards compatibility issues.
This was clarified and an option for line tables only
was added. Additionally an option for line info
directives only was added, which is well needed for
some targets. The debug info options should now
behave the same as clang's debug info options.
@JohnCSimon JohnCSimon 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 20, 2021
* `1`: line tables only.
* `2`: full debug info.
* `0` or `none`: no debug info at all (the default).
* `line-directives-only`: line info directives only, (For the nvptx* targets this enables [profiling](https://reviews.llvm.org/D46061), but on other targets the behavior is unspecified).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, claiming unspecified behaviour in our flags unnecessarily feels… bad? Could we just say "enables profiling for some targets" (also what kind of profiling? sampling? instrumented?) for now?

@JohnCSimon JohnCSimon 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 19, 2021
@JohnCSimon
Copy link
Member

ping from triage:
@jdtatz Can you please address the comment from the reviewer?

@JohnCSimon JohnCSimon 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 5, 2021
@bors
Copy link
Contributor

bors commented Dec 30, 2021

☔ The latest upstream changes (presumably #88354) made this pull request unmergeable. Please resolve the merge conflicts.

@JohnCSimon
Copy link
Member

Ping from triage:
@jdtatz
I'm closing this due to inactivity, Please reopen when you are ready to continue with this. Thank you.

@rustbot label: +S-inactive

@JohnCSimon JohnCSimon closed this Jan 30, 2022
@rustbot rustbot added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Jan 30, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2023
…oerister

Extend -Cdebuginfo with new options and named aliases

This is a rebase of rust-lang#83947, along with my best guess at what the new options mean. I tried to follow the LLVM source code to get a better idea but ran into quite a lot of trouble (https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/go-to-definition.20in.20src.2Fllvm-project.3F). The description for the original PR follows below.

Note that the changes in this PR have already been through FCP: rust-lang#83947 (comment)

Closes rust-lang#109311. Helps with rust-lang#104968.
r? `@michaelwoerister` cc `@cuviper`

---

The -Cdebuginfo=1 option was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for emitting line tables only was added. Additionally an option for emitting line info directives only was added, which is needed for some targets, i.e. nvptx. The debug info options should now behave similarly to clang's debug info options.

Fix rust-lang#60020
Fix rust-lang#64405
saethlin pushed a commit to saethlin/miri that referenced this pull request Apr 10, 2023
Extend -Cdebuginfo with new options and named aliases

This is a rebase of rust-lang/rust#83947, along with my best guess at what the new options mean. I tried to follow the LLVM source code to get a better idea but ran into quite a lot of trouble (https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/go-to-definition.20in.20src.2Fllvm-project.3F). The description for the original PR follows below.

Note that the changes in this PR have already been through FCP: rust-lang/rust#83947 (comment)

Closes rust-lang/rust#109311. Helps with rust-lang/rust#104968.
r? `@michaelwoerister` cc `@cuviper`

---

The -Cdebuginfo=1 option was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for emitting line tables only was added. Additionally an option for emitting line info directives only was added, which is needed for some targets, i.e. nvptx. The debug info options should now behave similarly to clang's debug info options.

Fix rust-lang/rust#60020
Fix rust-lang/rust#64405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. 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