diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index 3d191669b1a..4e810cf931e 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -684,7 +684,6 @@ fn test_unstable_options_tracking_hash() { // tidy-alphabetical-start untracked!(assert_incr_state, Some(String::from("loaded"))); untracked!(deduplicate_diagnostics, false); - untracked!(dep_tasks, true); untracked!(dont_buffer_diagnostics, true); untracked!(dump_dep_graph, true); untracked!(dump_mir, Some(String::from("abc"))); diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 536c0a20e2a..6ad72e37a8c 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -440,8 +440,6 @@ where ); if let Some(key) = Q::Key::recover(tcx, &dep_node) { - #[cfg(debug_assertions)] - let _guard = tracing::span!(tracing::Level::TRACE, stringify!($name), ?key).entered(); force_query(query, QueryCtxt::new(tcx), key, dep_node); true } else { diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index 5ce21e0bbc6..6cace01955e 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -149,7 +149,6 @@ impl DepGraph { DepNode { kind: D::DEP_KIND_RED, hash: Fingerprint::ZERO.into() }, EdgesVec::new(), None, - false, ); assert_eq!(red_node_index, DepNodeIndex::FOREVER_RED_NODE); match red_node_prev_index_and_color { @@ -373,8 +372,6 @@ impl DepGraphData { let current_fingerprint = hash_result.map(|f| dcx.with_stable_hashing_context(|mut hcx| f(&mut hcx, &result))); - let print_status = cfg!(debug_assertions) && dcx.sess().opts.unstable_opts.dep_tasks; - // Intern the new `DepNode`. let (dep_node_index, prev_and_color) = self.current.intern_node( dcx.profiler(), @@ -382,7 +379,6 @@ impl DepGraphData { key, edges, current_fingerprint, - print_status, ); hashing_timer.finish_with_query_invocation_id(dep_node_index.into()); @@ -589,8 +585,6 @@ impl DepGraph { cx.with_stable_hashing_context(|mut hcx| hash_result(&mut hcx, result)) }); - let print_status = cfg!(debug_assertions) && cx.sess().opts.unstable_opts.dep_tasks; - // Intern the new `DepNode` with the dependencies up-to-now. let (dep_node_index, prev_and_color) = data.current.intern_node( cx.profiler(), @@ -598,7 +592,6 @@ impl DepGraph { node, edges, current_fingerprint, - print_status, ); hashing_timer.finish_with_query_invocation_id(dep_node_index.into()); @@ -1219,20 +1212,13 @@ impl CurrentDepGraph { key: DepNode, edges: EdgesVec, fingerprint: Option, - print_status: bool, ) -> (DepNodeIndex, Option<(SerializedDepNodeIndex, DepNodeColor)>) { - let print_status = cfg!(debug_assertions) && print_status; - // Get timer for profiling `DepNode` interning let _node_intern_timer = self.node_intern_event_id.map(|eid| profiler.generic_activity_with_event_id(eid)); if let Some(prev_index) = prev_graph.node_to_index_opt(&key) { - let get_dep_node_index = |color, fingerprint| { - if print_status { - eprintln!("[task::{color:}] {key:?}"); - } - + let get_dep_node_index = |fingerprint| { let mut prev_index_to_index = self.prev_index_to_index.lock(); let dep_node_index = match prev_index_to_index[prev_index] { @@ -1256,12 +1242,12 @@ impl CurrentDepGraph { if fingerprint == prev_graph.fingerprint_by_index(prev_index) { // This is a green node: it existed in the previous compilation, // its query was re-executed, and it has the same result as before. - let dep_node_index = get_dep_node_index("green", fingerprint); + let dep_node_index = get_dep_node_index(fingerprint); (dep_node_index, Some((prev_index, DepNodeColor::Green(dep_node_index)))) } else { // This is a red node: it existed in the previous compilation, its query // was re-executed, but it has a different result from before. - let dep_node_index = get_dep_node_index("red", fingerprint); + let dep_node_index = get_dep_node_index(fingerprint); (dep_node_index, Some((prev_index, DepNodeColor::Red))) } } else { @@ -1269,14 +1255,10 @@ impl CurrentDepGraph { // session, its query was re-executed, but it doesn't compute a result hash // (i.e. it represents a `no_hash` query), so we have no way of determining // whether or not the result was the same as before. - let dep_node_index = get_dep_node_index("unknown", Fingerprint::ZERO); + let dep_node_index = get_dep_node_index(Fingerprint::ZERO); (dep_node_index, Some((prev_index, DepNodeColor::Red))) } } else { - if print_status { - eprintln!("[task::new] {key:?}"); - } - let fingerprint = fingerprint.unwrap_or(Fingerprint::ZERO); // This is a new node: it didn't exist in the previous compilation session. diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index fd473acbd3c..df92d8262e3 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1492,9 +1492,6 @@ options! { dep_info_omit_d_target: bool = (false, parse_bool, [TRACKED], "in dep-info output, omit targets for tracking dependencies of the dep-info files \ themselves (default: no)"), - dep_tasks: bool = (false, parse_bool, [UNTRACKED], - "print tasks that execute and the color their dep node gets (requires debug build) \ - (default: no)"), dont_buffer_diagnostics: bool = (false, parse_bool, [UNTRACKED], "emit diagnostics rather than buffering (breaks NLL error downgrading, sorting) \ (default: no)"),