Skip to content

Commit 9747ee4

Browse files
committedFeb 9, 2022
Auto merge of #93724 - Mark-Simulacrum:drop-query-stats, r=michaelwoerister
Delete -Zquery-stats infrastructure These statistics are computable from the self-profile data and/or ad-hoc collectable as needed, and in the meantime contribute to rustc bootstrap times -- locally, this PR shaves ~2.5% from rustc_query_impl builds in instruction counts. If this does lose some functionality we want to keep, I think we should migrate it to self-profile (or a similar interface) rather than this ad-hoc reporting.
2 parents b7cd0f7 + 257839b commit 9747ee4

File tree

5 files changed

+0
-122
lines changed

5 files changed

+0
-122
lines changed
 

‎compiler/rustc_interface/src/queries.rs

-4
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,6 @@ impl Compiler {
400400
gcx.enter(rustc_query_impl::alloc_self_profile_query_strings);
401401
}
402402

403-
if self.session().opts.debugging_opts.query_stats {
404-
gcx.enter(rustc_query_impl::print_stats);
405-
}
406-
407403
self.session()
408404
.time("serialize_dep_graph", || gcx.enter(rustc_incremental::save_dep_graph));
409405
}

‎compiler/rustc_interface/src/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@ fn test_debugging_options_tracking_hash() {
684684
untracked!(print_type_sizes, true);
685685
untracked!(proc_macro_backtrace, true);
686686
untracked!(query_dep_graph, true);
687-
untracked!(query_stats, true);
688687
untracked!(save_analysis, true);
689688
untracked!(self_profile, SwitchWithOptPath::Enabled(None));
690689
untracked!(self_profile_events, Some(vec![String::new()]));

‎compiler/rustc_query_impl/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ mod plumbing;
2828
pub use plumbing::QueryCtxt;
2929
use rustc_query_system::query::*;
3030

31-
mod stats;
32-
pub use self::stats::print_stats;
33-
3431
mod keys;
3532
use keys::Key;
3633

‎compiler/rustc_query_impl/src/stats.rs

-112
This file was deleted.

‎compiler/rustc_session/src/options.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1369,8 +1369,6 @@ options! {
13691369
"use the given `.prof` file for sampled profile-guided optimization (also known as AutoFDO)"),
13701370
query_dep_graph: bool = (false, parse_bool, [UNTRACKED],
13711371
"enable queries of the dependency graph for regression testing (default: no)"),
1372-
query_stats: bool = (false, parse_bool, [UNTRACKED],
1373-
"print some statistics about the query system (default: no)"),
13741372
randomize_layout: bool = (false, parse_bool, [TRACKED],
13751373
"randomize the layout of types (default: no)"),
13761374
layout_seed: Option<u64> = (None, parse_opt_number, [TRACKED],

0 commit comments

Comments
 (0)