-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
debuginfo: Stabilize -Z debug-macros
, -Z collapse-macro-debuginfo
and #[collapse_debuginfo]
#120845
Conversation
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 The Miri subtree was changed cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
I haven't thoroughly reviewed the changes here but this seems sensible to me at first glance. |
I removed one fast path optimization for simplicity, so let's also run benchmarks. |
This comment has been minimized.
This comment has been minimized.
debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and `#[collapse_debuginfo]` `-Z debug-macros` is "stabilized" by enabling it by default and removing. `-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`. It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no. Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local) - rust-lang#100758 (comment) describes some debugging scenarios that motivate this default as reasonable. `#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default. Closes rust-lang#100758 Closes rust-lang#41743 Closes rust-lang#39153 TODO: Stabilization report
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (575a7f3): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 663.718s -> 664.389s (0.10%) |
Perf changes are noise. |
Stabilization ReportBefore this PR all spans coming from macro definitions were by default collapsed to a single span representing the macro's call site when generating debuginfo. With this PR the Attributes History#41743 identified the problem with detailed debuginfo spans for macros not being available on stable channel. rust-lang/rfcs#2117 and rust-lang/compiler-team#386 provided the solution for undesirable jumping to sources of #118903 added detailed tests for the feature and fixed some issues with nested macro calls in December 2023. Designrust-lang/compiler-team#386 gives motivation for not collapsing macros in debuginfo in general, but collapsing some macros in particular. Comments in #100758 (comment) and below describe some possible debugging scenarios, and make a choice for the default collapsing behavior implemented in this PR. Tests
Documentation
|
@rfcbot fcp merge |
Team member @petrochenkov has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
|
debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and `#[collapse_debuginfo]` `-Z debug-macros` is "stabilized" by enabling it by default and removing. `-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`. It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no. Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local) - rust-lang#100758 (comment) describes some debugging scenarios that motivate this default as reasonable. `#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default. Stabilization report: rust-lang#120845 (comment) Closes rust-lang#100758 Closes rust-lang#41743 Closes rust-lang#39153
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
@bors r=oli-obk |
☀️ Test successful - checks-actions |
debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and `#[collapse_debuginfo]` `-Z debug-macros` is "stabilized" by enabling it by default and removing. `-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`. It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no. Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local) - rust-lang/rust#100758 (comment) describes some debugging scenarios that motivate this default as reasonable. `#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default. Stabilization report: rust-lang/rust#120845 (comment) Closes rust-lang/rust#100758 Closes rust-lang/rust#41743 Closes rust-lang/rust#39153
Finished benchmarking commit (6acb9e7): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 670.868s -> 670.073s (-0.12%) |
This has broken a test in backtrace (rust-lang/backtrace-rs#617). The The debuginfo for line 11 is now line 11 instead of the caller, as expected. However, the result of the |
@philipc |
UPD: As for values returned by |
Breaking the test was fine if it can still be configured to pass. I'm glad that we moved that test into rustc's suite, so that it can be kept current with current defaults. I'm not sure that I want to remove the copy of the test from the backtrace suite yet, but I can just copy petrochenkov's changes to fix it. |
-Z debug-macros
is "stabilized" by enabling it by default and removing.-Z collapse-macro-debuginfo
is stabilized as-C collapse-macro-debuginfo
.It now supports all typical boolean values (
parse_opt_bool
) in addition to just yes/no.Default value of
collapse_debuginfo
was changed fromfalse
toexternal
(i.e. collapsed if external, not collapsed if local) - #100758 (comment) describes some debugging scenarios that motivate this default as reasonable.#[collapse_debuginfo]
attribute without a value is no longer supported to avoid guessing the default.Stabilization report: #120845 (comment)
Closes #100758
Closes #41743
Closes #39153