about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-05 02:49:16 +0000
committerbors <bors@rust-lang.org>2022-05-05 02:49:16 +0000
commit7d3e03666a93bd2b0f78b3933f9305832af771a5 (patch)
tree94da1941a3795bd5faf7ed469b1d2edc9bf9c1d0 /compiler/rustc_query_impl/src
parentbdcb6a99e853732f8ec050ae4986aa3af51d44c5 (diff)
parentade123275db92898b13faffea08893f0a6737ff4 (diff)
downloadrust-7d3e03666a93bd2b0f78b3933f9305832af771a5.tar.gz
rust-7d3e03666a93bd2b0f78b3933f9305832af771a5.zip
Auto merge of #96720 - JohnTitor:rollup-9jaaekr, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #96603 (Enable full revision in const generics ui tests)
 - #96616 (Relax memory ordering used in `min_stack`)
 - #96619 (Relax memory ordering used in SameMutexCheck)
 - #96628 (Stabilize `bool::then_some`)
 - #96658 (Move callback to the () => {} syntax.)
 - #96677 (Add more tests for label-break-value)
 - #96697 (Enable tracing for all queries)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_query_impl/src')
-rw-r--r--compiler/rustc_query_impl/src/plumbing.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index bc82b0053b9..ae4ad428159 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -435,6 +435,8 @@ macro_rules! define_queries {
 
                 fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: DepNode) -> bool {
                     if let Some(key) = recover(tcx, dep_node) {
+                        #[cfg(debug_assertions)]
+                        let _guard = tracing::span!(tracing::Level::TRACE, stringify!($name), ?key).entered();
                         let tcx = QueryCtxt::from_tcx(tcx);
                         force_query::<queries::$name<'_>, _>(tcx, key, dep_node);
                         true
@@ -532,6 +534,7 @@ macro_rules! define_queries_struct {
 
             $($(#[$attr])*
             #[inline(always)]
+            #[tracing::instrument(level = "trace", skip(self, tcx))]
             fn $name(
                 &'tcx self,
                 tcx: TyCtxt<$tcx>,