@@ -12,7 +12,7 @@ use crate::session::{CrateDisambiguator, Session};
12
12
use crate :: ty;
13
13
use crate :: ty:: codec:: { self as ty_codec, TyDecoder , TyEncoder } ;
14
14
use crate :: ty:: context:: TyCtxt ;
15
- use crate :: util:: common:: time;
15
+ use crate :: util:: common:: { time, time_ext } ;
16
16
17
17
use errors:: Diagnostic ;
18
18
use rustc_data_structures:: fx:: FxHashMap ;
@@ -1080,23 +1080,22 @@ fn encode_query_results<'enc, 'a, 'tcx, Q, E>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
1080
1080
let desc = & format ! ( "encode_query_results for {}" ,
1081
1081
unsafe { :: std:: intrinsics:: type_name:: <Q >( ) } ) ;
1082
1082
1083
- time ( tcx. sess , desc, || {
1083
+ time_ext ( tcx. sess . time_extended ( ) , Some ( tcx. sess ) , desc, || {
1084
+ let map = Q :: query_cache ( tcx) . borrow ( ) ;
1085
+ assert ! ( map. active. is_empty( ) ) ;
1086
+ for ( key, entry) in map. results . iter ( ) {
1087
+ if Q :: cache_on_disk ( tcx, key. clone ( ) ) {
1088
+ let dep_node = SerializedDepNodeIndex :: new ( entry. index . index ( ) ) ;
1084
1089
1085
- let map = Q :: query_cache ( tcx) . borrow ( ) ;
1086
- assert ! ( map. active. is_empty( ) ) ;
1087
- for ( key, entry) in map. results . iter ( ) {
1088
- if Q :: cache_on_disk ( tcx, key. clone ( ) ) {
1089
- let dep_node = SerializedDepNodeIndex :: new ( entry. index . index ( ) ) ;
1090
+ // Record position of the cache entry
1091
+ query_result_index. push ( ( dep_node, AbsoluteBytePos :: new ( encoder. position ( ) ) ) ) ;
1090
1092
1091
- // Record position of the cache entry
1092
- query_result_index. push ( ( dep_node, AbsoluteBytePos :: new ( encoder. position ( ) ) ) ) ;
1093
-
1094
- // Encode the type check tables with the SerializedDepNodeIndex
1095
- // as tag.
1096
- encoder. encode_tagged ( dep_node, & entry. value ) ?;
1093
+ // Encode the type check tables with the SerializedDepNodeIndex
1094
+ // as tag.
1095
+ encoder. encode_tagged ( dep_node, & entry. value ) ?;
1096
+ }
1097
1097
}
1098
- }
1099
1098
1100
- Ok ( ( ) )
1099
+ Ok ( ( ) )
1101
1100
} )
1102
1101
}
0 commit comments