Uh oh!
There was an error while loading. Please reload this page.
Remove queries from the driver interface - #134302
Conversation
rustbot
commented
Dec 14, 2024
rustbot
commented
Dec 14, 2024
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
| &'tcx WorkerLocal<rustc_hir::Arena<'tcx>>, | ||
| F, | ||
| ) -> T, | ||
| > = Box::new(move |compiler, gcx_cell, arena, hir_arena, f| { |
There was a problem hiding this comment.
This is ugly, but the only way I could figure out to get all invariant lifetimes correctly inferred by rustc.
| let res = f(tcx); | ||
| // FIXME maybe run finish even when a fatal error occured? or at least tcx.alloc_self_profile_query_strings()? | ||
| tcx.finish(); |
There was a problem hiding this comment.
This fixme is a pre-existing issue.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
This allows us to call GlobalCtxt::finish exactly once.
a5188c2 to
7738929Compare
This comment has been minimized.
This comment has been minimized.
19bf2af to
b0cd37eComparejieyouxu
commented
Dec 15, 2024
r? jieyouxu |
jieyouxu
commented
Dec 15, 2024
oli-obk
commented
Dec 15, 2024
Yea I already reviewed all of it but the lifetime stuff. But since at best I'd have some golfing for it, r=me,jieyouzu I can golf once it's landed |
jieyouxu
commented
Dec 15, 2024
In that case, I say we try to land this first, the lifetimes in passes are a bit annoying but I don't think is worth blocking, as oli said. @bors r=oli-obk,jieyouxu rollup=never (tricky driver changes) |
bors
commented
Dec 15, 2024
bors
commented
Dec 17, 2024
bors
commented
Dec 17, 2024
☀️ Test successful - checks-actions |
rust-timer
commented
Dec 17, 2024
Finished benchmarking commit (978c659): comparison URL. Overall result: ❌ regressions - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 3.0%, secondary -1.9%)This 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.
CyclesResults (primary 1.9%, secondary 3.1%)This 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 sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 773.739s -> 770.381s (-0.43%) |
…eyouxu Improve dependency_format a bit * Make `DependencyList` an `IndexVec` rather than emulating one using a `Vec` (which was off-by-one as LOCAL_CRATE was intentionally skipped) * Update some comments for the fact that we now use `#[global_allocator]` rather than `extern crate alloc_system;`/`extern crate alloc_jemalloc;` for specifying which allocator to use. We still use a similar mechanism for the panic runtime, so refer to the panic runtime in those comments instead. * An unrelated refactor to `create_and_enter_global_ctxt` I forgot to include in rust-lang#134302. This refactor is too small to be worth it's own PR.
…eyouxu Improve dependency_format a bit * Make `DependencyList` an `IndexVec` rather than emulating one using a `Vec` (which was off-by-one as LOCAL_CRATE was intentionally skipped) * Update some comments for the fact that we now use `#[global_allocator]` rather than `extern crate alloc_system;`/`extern crate alloc_jemalloc;` for specifying which allocator to use. We still use a similar mechanism for the panic runtime, so refer to the panic runtime in those comments instead. * An unrelated refactor to `create_and_enter_global_ctxt` I forgot to include in rust-lang#134302. This refactor is too small to be worth it's own PR.
…eyouxu Improve dependency_format a bit * Make `DependencyList` an `IndexVec` rather than emulating one using a `Vec` (which was off-by-one as LOCAL_CRATE was intentionally skipped) * Update some comments for the fact that we now use `#[global_allocator]` rather than `extern crate alloc_system;`/`extern crate alloc_jemalloc;` for specifying which allocator to use. We still use a similar mechanism for the panic runtime, so refer to the panic runtime in those comments instead. * An unrelated refactor to `create_and_enter_global_ctxt` I forgot to include in rust-lang#134302. This refactor is too small to be worth it's own PR.
Rollup merge of rust-lang#134514 - bjorn3:more_driver_refactors, r=jieyouxu Improve dependency_format a bit * Make `DependencyList` an `IndexVec` rather than emulating one using a `Vec` (which was off-by-one as LOCAL_CRATE was intentionally skipped) * Update some comments for the fact that we now use `#[global_allocator]` rather than `extern crate alloc_system;`/`extern crate alloc_jemalloc;` for specifying which allocator to use. We still use a similar mechanism for the panic runtime, so refer to the panic runtime in those comments instead. * An unrelated refactor to `create_and_enter_global_ctxt` I forgot to include in rust-lang#134302. This refactor is too small to be worth it's own PR.
Improve dependency_format a bit * Make `DependencyList` an `IndexVec` rather than emulating one using a `Vec` (which was off-by-one as LOCAL_CRATE was intentionally skipped) * Update some comments for the fact that we now use `#[global_allocator]` rather than `extern crate alloc_system;`/`extern crate alloc_jemalloc;` for specifying which allocator to use. We still use a similar mechanism for the panic runtime, so refer to the panic runtime in those comments instead. * An unrelated refactor to `create_and_enter_global_ctxt` I forgot to include in rust-lang/rust#134302. This refactor is too small to be worth it's own PR.
Kobzol
commented
Dec 23, 2024
This seems to have regressed |
| if sess.dcx().has_errors().is_some() { | ||
| sess.dcx().fatal("Compilation failed, aborting rustdoc"); | ||
| } |
There was a problem hiding this comment.
Looks like this accidentally got moved out of the create_and_enter_global_ctxt().
There was a problem hiding this comment.
Would this be related to the rustdoc regression?
There was a problem hiding this comment.
I don't think so. In any case opened #135157 to revert this code movement.
bjorn3
commented
Dec 23, 2024
No regressions of any kind were expected. |
Kobzol
commented
Dec 23, 2024
Ok. Given that the regressions are tiny and only in doc builds, I think that it is fine. @rustbot label: +perf-regression-triaged |
…jieyouxu,GuillaumeGomez Move the has_errors check in rustdoc back to after TyCtxt is created This was accidentally moved before TyCtxt creation by rust-lang#134302.
…jieyouxu,GuillaumeGomez Move the has_errors check in rustdoc back to after TyCtxt is created This was accidentally moved before TyCtxt creation by rust-lang#134302.
Rollup merge of rust-lang#135157 - bjorn3:fix_rustdoc_error_abort, r=jieyouxu,GuillaumeGomez Move the has_errors check in rustdoc back to after TyCtxt is created This was accidentally moved before TyCtxt creation by rust-lang#134302.
marxin
commented
Jan 10, 2025
@bjorn3 |
bjorn3
commented
Jan 20, 2025
That was fixed in rust-lang/rustc-dev-guide@7a4c3d3. |
Improve dependency_format a bit * Make `DependencyList` an `IndexVec` rather than emulating one using a `Vec` (which was off-by-one as LOCAL_CRATE was intentionally skipped) * Update some comments for the fact that we now use `#[global_allocator]` rather than `extern crate alloc_system;`/`extern crate alloc_jemalloc;` for specifying which allocator to use. We still use a similar mechanism for the panic runtime, so refer to the panic runtime in those comments instead. * An unrelated refactor to `create_and_enter_global_ctxt` I forgot to include in rust-lang/rust#134302. This refactor is too small to be worth it's own PR.
Improve dependency_format a bit * Make `DependencyList` an `IndexVec` rather than emulating one using a `Vec` (which was off-by-one as LOCAL_CRATE was intentionally skipped) * Update some comments for the fact that we now use `#[global_allocator]` rather than `extern crate alloc_system;`/`extern crate alloc_jemalloc;` for specifying which allocator to use. We still use a similar mechanism for the panic runtime, so refer to the panic runtime in those comments instead. * An unrelated refactor to `create_and_enter_global_ctxt` I forgot to include in rust-lang/rust#134302. This refactor is too small to be worth it's own PR.
All uses of driver queries in the public api of rustc_driver have been removed in #134130 already. This removes driver queries from rustc_interface and does a couple of cleanups around TyCtxt construction and entering enabled by this removal.
Finishes the removal of driver queries started with #126834.