Skip to content

Commit

Permalink
Auto merge of #93724 - Mark-Simulacrum:drop-query-stats, r=michaelwoe…
Browse files Browse the repository at this point in the history
…rister

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.
  • Loading branch information
bors committed Feb 9, 2022
2 parents b7cd0f7 + 257839b commit 9747ee4
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 122 deletions.
4 changes: 0 additions & 4 deletions compiler/rustc_interface/src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,6 @@ impl Compiler {
gcx.enter(rustc_query_impl::alloc_self_profile_query_strings);
}

if self.session().opts.debugging_opts.query_stats {
gcx.enter(rustc_query_impl::print_stats);
}

self.session()
.time("serialize_dep_graph", || gcx.enter(rustc_incremental::save_dep_graph));
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_interface/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ fn test_debugging_options_tracking_hash() {
untracked!(print_type_sizes, true);
untracked!(proc_macro_backtrace, true);
untracked!(query_dep_graph, true);
untracked!(query_stats, true);
untracked!(save_analysis, true);
untracked!(self_profile, SwitchWithOptPath::Enabled(None));
untracked!(self_profile_events, Some(vec![String::new()]));
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_query_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ mod plumbing;
pub use plumbing::QueryCtxt;
use rustc_query_system::query::*;

mod stats;
pub use self::stats::print_stats;

mod keys;
use keys::Key;

Expand Down
112 changes: 0 additions & 112 deletions compiler/rustc_query_impl/src/stats.rs

This file was deleted.

2 changes: 0 additions & 2 deletions compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1369,8 +1369,6 @@ options! {
"use the given `.prof` file for sampled profile-guided optimization (also known as AutoFDO)"),
query_dep_graph: bool = (false, parse_bool, [UNTRACKED],
"enable queries of the dependency graph for regression testing (default: no)"),
query_stats: bool = (false, parse_bool, [UNTRACKED],
"print some statistics about the query system (default: no)"),
randomize_layout: bool = (false, parse_bool, [TRACKED],
"randomize the layout of types (default: no)"),
layout_seed: Option<u64> = (None, parse_opt_number, [TRACKED],
Expand Down

0 comments on commit 9747ee4

Please sign in to comment.