File tree 1 file changed +9
-1
lines changed
compiler/rustc_query_impl/src
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -531,6 +531,8 @@ macro_rules! define_queries {
531
531
key: queries:: $name:: Key <' tcx>,
532
532
mode: QueryMode ,
533
533
) -> Option <Erase <queries:: $name:: Value <' tcx>>> {
534
+ #[ cfg( debug_assertions) ]
535
+ let _guard = tracing:: span!( tracing:: Level :: TRACE , stringify!( $name) , ?key) . entered( ) ;
534
536
get_query_incr(
535
537
QueryType :: config( tcx) ,
536
538
QueryCtxt :: new( tcx) ,
@@ -571,10 +573,16 @@ macro_rules! define_queries {
571
573
cache_on_disk: |tcx, key| :: rustc_middle:: query:: cached:: $name( tcx, key) ,
572
574
execute_query: |tcx, key| erase( tcx. $name( key) ) ,
573
575
compute: |tcx, key| {
576
+ #[ cfg( debug_assertions) ]
577
+ let _guard = tracing:: span!( tracing:: Level :: TRACE , stringify!( $name) , ?key) . entered( ) ;
574
578
__rust_begin_short_backtrace( ||
575
579
queries:: $name:: provided_to_erased(
576
580
tcx,
577
- call_provider!( [ $( $modifiers) * ] [ tcx, $name, key] )
581
+ {
582
+ let ret = call_provider!( [ $( $modifiers) * ] [ tcx, $name, key] ) ;
583
+ tracing:: trace!( ?ret) ;
584
+ ret
585
+ }
578
586
)
579
587
)
580
588
} ,
You can’t perform that action at this time.
0 commit comments