Skip to content

Mark the compile unit for -Zdebuginfo-for-profiling - #165490

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
apolloww:debuginfo-for-profiling-compile-unit
Nov 10, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
apolloww:debuginfo-for-profiling-compile-unit

Conversation

@apolloww

@apolloww apolloww commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

With -Zdebuginfo-for-profiling, set debugInfoForProfiling on the DICompileUnit, as Clang does for -fdebug-info-for-profiling (CGDebugInfo.cpp). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the
`DICompileUnit`, as Clang does for `-fdebug-info-for-profiling`
(`CGDebugInfo.cpp`). Before this change, the flag only added the
discriminators pass, and the compile unit flag was always false.
@rustbot

rustbot commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_codegen_llvm/src/debuginfo

cc @Walnut356

@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

@dtolnay dtolnay left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dtolnay

dtolnay commented Nov 9, 2026

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7530fc1 has been approved by dtolnay

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 Nov 9, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 9, 2026
…ompile-unit, r=dtolnay

Mark the compile unit for `-Zdebuginfo-for-profiling`

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the `DICompileUnit`, as Clang does for `-fdebug-info-for-profiling` (`CGDebugInfo.cpp`). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 10, 2026
…ompile-unit, r=dtolnay

Mark the compile unit for `-Zdebuginfo-for-profiling`

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the `DICompileUnit`, as Clang does for `-fdebug-info-for-profiling` (`CGDebugInfo.cpp`). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 10, 2026
…ompile-unit, r=dtolnay

Mark the compile unit for `-Zdebuginfo-for-profiling`

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the `DICompileUnit`, as Clang does for `-fdebug-info-for-profiling` (`CGDebugInfo.cpp`). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 10, 2026
…ompile-unit, r=dtolnay

Mark the compile unit for `-Zdebuginfo-for-profiling`

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the `DICompileUnit`, as Clang does for `-fdebug-info-for-profiling` (`CGDebugInfo.cpp`). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.
rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #165575 (Upgrade bundled musl to 1.2.6)
 - #163992 (add `core::arch::{x86, x86_64}::x87_f80`)
 - #165117 (std: use skip_unsupported_miri_tests to control when tests should be skipped in Miri due to missing shims)
 - #165458 (fix incorrect byte count suffix on MSVC)
 - #165487 (Migrate built-in macros `pattern_type` & `view_type` to macros 2.0 that expand to internal syntax)
 - #165490 (Mark the compile unit for `-Zdebuginfo-for-profiling`)
 - #165586 (Remove `backend_optimization_level`.)
 - #165646 (fix NumScalableVectors::from_field_count)
 - #165655 (Unignore passing GCC backend tests)
 - #165740 (miri subtree update)
 - #164559 (Windows: fix Dir::remove and Dir::rename following symlinks)
 - #165682 (interpret: ensure newly created unions have uninit in their padding)
 - #165693 (Move `check_attr` to attribute parsing)
 - #165715 (windows: check for null before wide encoding)
 - #165717 (mpsc_sync::stream_send_recv_stress: wait for all threads to finish)
 - #165733 (docs(num): remove needless whitespaces)

Failed merges:

 - #165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - #153261 (Partially stabilize `ptr_alignment_type` as `alignment_type`)
 - #164218 (Tweak private re-export errors to point at correct span and have more context)
 - #165709 (remove 'x miri' smoke test from PR CI)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 10, 2026
…ompile-unit, r=dtolnay

Mark the compile unit for `-Zdebuginfo-for-profiling`

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the `DICompileUnit`, as Clang does for `-fdebug-info-for-profiling` (`CGDebugInfo.cpp`). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.
rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #165575 (Upgrade bundled musl to 1.2.6)
 - #163992 (add `core::arch::{x86, x86_64}::x87_f80`)
 - #165117 (std: use skip_unsupported_miri_tests to control when tests should be skipped in Miri due to missing shims)
 - #165458 (fix incorrect byte count suffix on MSVC)
 - #165490 (Mark the compile unit for `-Zdebuginfo-for-profiling`)
 - #165586 (Remove `backend_optimization_level`.)
 - #165646 (fix NumScalableVectors::from_field_count)
 - #165655 (Unignore passing GCC backend tests)
 - #165740 (miri subtree update)
 - #153261 (Partially stabilize `ptr_alignment_type` as `alignment_type`)
 - #164559 (Windows: fix Dir::remove and Dir::rename following symlinks)
 - #165682 (interpret: ensure newly created unions have uninit in their padding)
 - #165693 (Move `check_attr` to attribute parsing)
 - #165715 (windows: check for null before wide encoding)
 - #165717 (mpsc_sync::stream_send_recv_stress: wait for all threads to finish)
 - #165733 (docs(num): remove needless whitespaces)

Failed merges:

 - #165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - #164218 (Tweak private re-export errors to point at correct span and have more context)
 - #165709 (remove 'x miri' smoke test from PR CI)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 10, 2026
…ompile-unit, r=dtolnay

Mark the compile unit for `-Zdebuginfo-for-profiling`

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the `DICompileUnit`, as Clang does for `-fdebug-info-for-profiling` (`CGDebugInfo.cpp`). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 10, 2026
…ompile-unit, r=dtolnay

Mark the compile unit for `-Zdebuginfo-for-profiling`

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the `DICompileUnit`, as Clang does for `-fdebug-info-for-profiling` (`CGDebugInfo.cpp`). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.
rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - #165709 (remove 'x miri' smoke test from PR CI)
 - #164217 (Prepare to make `rustc_trivial_field_reads` usable in user code)
 - #165569 (`Move` trait feature gate)
 - #165575 (Upgrade bundled musl to 1.2.6)
 - #163241 (Add enclosing item context when pointing at `FnMut` bound)
 - #163992 (add `core::arch::{x86, x86_64}::x87_f80`)
 - #165047 (Change the span building of paths from first-to-last to chained)
 - #165458 (fix incorrect byte count suffix on MSVC)
 - #165490 (Mark the compile unit for `-Zdebuginfo-for-profiling`)
 - #165586 (Remove `backend_optimization_level`.)
 - #165646 (fix NumScalableVectors::from_field_count)
 - #165655 (Unignore passing GCC backend tests)
 - #165740 (miri subtree update)
 - #165753 (avoid Terminator:None in MIR inliner)
 - #153261 (Partially stabilize `ptr_alignment_type` as `alignment_type`)
 - #164559 (Windows: fix Dir::remove and Dir::rename following symlinks)
 - #165562 (stop using gce in a test)
 - #165681 (Add safety requirements for Pattern and Searcher)
 - #165682 (interpret: ensure newly created unions have uninit in their padding)
 - #165693 (Move `check_attr` to attribute parsing)
 - #165715 (windows: check for null before wide encoding)
 - #165717 (mpsc_sync::stream_send_recv_stress: wait for all threads to finish)
 - #165733 (docs(num): remove needless whitespaces)
 - #165739 (remove NOP File::flush from fs tests)

Failed merges:

 - #165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - #164218 (Tweak private re-export errors to point at correct span and have more context)
rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - #165709 (remove 'x miri' smoke test from PR CI)
 - #164217 (Prepare to make `rustc_trivial_field_reads` usable in user code)
 - #165569 (`Move` trait feature gate)
 - #165575 (Upgrade bundled musl to 1.2.6)
 - #163241 (Add enclosing item context when pointing at `FnMut` bound)
 - #163992 (add `core::arch::{x86, x86_64}::x87_f80`)
 - #165047 (Change the span building of paths from first-to-last to chained)
 - #165458 (fix incorrect byte count suffix on MSVC)
 - #165490 (Mark the compile unit for `-Zdebuginfo-for-profiling`)
 - #165586 (Remove `backend_optimization_level`.)
 - #165646 (fix NumScalableVectors::from_field_count)
 - #165655 (Unignore passing GCC backend tests)
 - #165740 (miri subtree update)
 - #165753 (avoid Terminator:None in MIR inliner)
 - #153261 (Partially stabilize `ptr_alignment_type` as `alignment_type`)
 - #164559 (Windows: fix Dir::remove and Dir::rename following symlinks)
 - #165562 (stop using gce in a test)
 - #165681 (Add safety requirements for Pattern and Searcher)
 - #165682 (interpret: ensure newly created unions have uninit in their padding)
 - #165693 (Move `check_attr` to attribute parsing)
 - #165715 (windows: check for null before wide encoding)
 - #165717 (mpsc_sync::stream_send_recv_stress: wait for all threads to finish)
 - #165733 (docs(num): remove needless whitespaces)
 - #165739 (remove NOP File::flush from fs tests)

Failed merges:

 - #165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - #164218 (Tweak private re-export errors to point at correct span and have more context)
@rust-bors
rust-bors Bot merged commit 5a3aed2 into rust-lang:main Nov 10, 2026
14 checks passed
rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
Rollup merge of #165490 - apolloww:debuginfo-for-profiling-compile-unit, r=dtolnay

Mark the compile unit for `-Zdebuginfo-for-profiling`

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the `DICompileUnit`, as Clang does for `-fdebug-info-for-profiling` (`CGDebugInfo.cpp`). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.
@rustbot rustbot added this to the 1.102.0 milestone Nov 10, 2026
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Nov 11, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - rust-lang/rust#165709 (remove 'x miri' smoke test from PR CI)
 - rust-lang/rust#164217 (Prepare to make `rustc_trivial_field_reads` usable in user code)
 - rust-lang/rust#165569 (`Move` trait feature gate)
 - rust-lang/rust#165575 (Upgrade bundled musl to 1.2.6)
 - rust-lang/rust#163241 (Add enclosing item context when pointing at `FnMut` bound)
 - rust-lang/rust#163992 (add `core::arch::{x86, x86_64}::x87_f80`)
 - rust-lang/rust#165047 (Change the span building of paths from first-to-last to chained)
 - rust-lang/rust#165458 (fix incorrect byte count suffix on MSVC)
 - rust-lang/rust#165490 (Mark the compile unit for `-Zdebuginfo-for-profiling`)
 - rust-lang/rust#165586 (Remove `backend_optimization_level`.)
 - rust-lang/rust#165646 (fix NumScalableVectors::from_field_count)
 - rust-lang/rust#165655 (Unignore passing GCC backend tests)
 - rust-lang/rust#165740 (miri subtree update)
 - rust-lang/rust#165753 (avoid Terminator:None in MIR inliner)
 - rust-lang/rust#153261 (Partially stabilize `ptr_alignment_type` as `alignment_type`)
 - rust-lang/rust#164559 (Windows: fix Dir::remove and Dir::rename following symlinks)
 - rust-lang/rust#165562 (stop using gce in a test)
 - rust-lang/rust#165681 (Add safety requirements for Pattern and Searcher)
 - rust-lang/rust#165682 (interpret: ensure newly created unions have uninit in their padding)
 - rust-lang/rust#165693 (Move `check_attr` to attribute parsing)
 - rust-lang/rust#165715 (windows: check for null before wide encoding)
 - rust-lang/rust#165717 (mpsc_sync::stream_send_recv_stress: wait for all threads to finish)
 - rust-lang/rust#165733 (docs(num): remove needless whitespaces)
 - rust-lang/rust#165739 (remove NOP File::flush from fs tests)

Failed merges:

 - rust-lang/rust#165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - rust-lang/rust#164218 (Tweak private re-export errors to point at correct span and have more context)
RalfJung pushed a commit to mehmettoplu-rs/miri that referenced this pull request Nov 11, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - rust-lang/rust#165709 (remove 'x miri' smoke test from PR CI)
 - rust-lang/rust#164217 (Prepare to make `rustc_trivial_field_reads` usable in user code)
 - rust-lang/rust#165569 (`Move` trait feature gate)
 - rust-lang/rust#165575 (Upgrade bundled musl to 1.2.6)
 - rust-lang/rust#163241 (Add enclosing item context when pointing at `FnMut` bound)
 - rust-lang/rust#163992 (add `core::arch::{x86, x86_64}::x87_f80`)
 - rust-lang/rust#165047 (Change the span building of paths from first-to-last to chained)
 - rust-lang/rust#165458 (fix incorrect byte count suffix on MSVC)
 - rust-lang/rust#165490 (Mark the compile unit for `-Zdebuginfo-for-profiling`)
 - rust-lang/rust#165586 (Remove `backend_optimization_level`.)
 - rust-lang/rust#165646 (fix NumScalableVectors::from_field_count)
 - rust-lang/rust#165655 (Unignore passing GCC backend tests)
 - rust-lang/rust#165740 (miri subtree update)
 - rust-lang/rust#165753 (avoid Terminator:None in MIR inliner)
 - rust-lang/rust#153261 (Partially stabilize `ptr_alignment_type` as `alignment_type`)
 - rust-lang/rust#164559 (Windows: fix Dir::remove and Dir::rename following symlinks)
 - rust-lang/rust#165562 (stop using gce in a test)
 - rust-lang/rust#165681 (Add safety requirements for Pattern and Searcher)
 - rust-lang/rust#165682 (interpret: ensure newly created unions have uninit in their padding)
 - rust-lang/rust#165693 (Move `check_attr` to attribute parsing)
 - rust-lang/rust#165715 (windows: check for null before wide encoding)
 - rust-lang/rust#165717 (mpsc_sync::stream_send_recv_stress: wait for all threads to finish)
 - rust-lang/rust#165733 (docs(num): remove needless whitespaces)
 - rust-lang/rust#165739 (remove NOP File::flush from fs tests)

Failed merges:

 - rust-lang/rust#165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - rust-lang/rust#164218 (Tweak private re-export errors to point at correct span and have more context)
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Nov 12, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - rust-lang/rust#165709 (remove 'x miri' smoke test from PR CI)
 - rust-lang/rust#164217 (Prepare to make `rustc_trivial_field_reads` usable in user code)
 - rust-lang/rust#165569 (`Move` trait feature gate)
 - rust-lang/rust#165575 (Upgrade bundled musl to 1.2.6)
 - rust-lang/rust#163241 (Add enclosing item context when pointing at `FnMut` bound)
 - rust-lang/rust#163992 (add `core::arch::{x86, x86_64}::x87_f80`)
 - rust-lang/rust#165047 (Change the span building of paths from first-to-last to chained)
 - rust-lang/rust#165458 (fix incorrect byte count suffix on MSVC)
 - rust-lang/rust#165490 (Mark the compile unit for `-Zdebuginfo-for-profiling`)
 - rust-lang/rust#165586 (Remove `backend_optimization_level`.)
 - rust-lang/rust#165646 (fix NumScalableVectors::from_field_count)
 - rust-lang/rust#165655 (Unignore passing GCC backend tests)
 - rust-lang/rust#165740 (miri subtree update)
 - rust-lang/rust#165753 (avoid Terminator:None in MIR inliner)
 - rust-lang/rust#153261 (Partially stabilize `ptr_alignment_type` as `alignment_type`)
 - rust-lang/rust#164559 (Windows: fix Dir::remove and Dir::rename following symlinks)
 - rust-lang/rust#165562 (stop using gce in a test)
 - rust-lang/rust#165681 (Add safety requirements for Pattern and Searcher)
 - rust-lang/rust#165682 (interpret: ensure newly created unions have uninit in their padding)
 - rust-lang/rust#165693 (Move `check_attr` to attribute parsing)
 - rust-lang/rust#165715 (windows: check for null before wide encoding)
 - rust-lang/rust#165717 (mpsc_sync::stream_send_recv_stress: wait for all threads to finish)
 - rust-lang/rust#165733 (docs(num): remove needless whitespaces)
 - rust-lang/rust#165739 (remove NOP File::flush from fs tests)

Failed merges:

 - rust-lang/rust#165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - rust-lang/rust#164218 (Tweak private re-export errors to point at correct span and have more context)
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants