@@ -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 ;
@@ -1082,23 +1082,22 @@ fn encode_query_results<'enc, 'a, 'tcx, Q, E>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
1082
1082
let desc = & format ! ( "encode_query_results for {}" ,
1083
1083
unsafe { :: std:: intrinsics:: type_name:: <Q >( ) } ) ;
1084
1084
1085
- time ( tcx. sess , desc, || {
1085
+ time_ext ( tcx. sess . time_extended ( ) , Some ( tcx. sess ) , desc, || {
1086
+ let map = Q :: query_cache ( tcx) . borrow ( ) ;
1087
+ assert ! ( map. active. is_empty( ) ) ;
1088
+ for ( key, entry) in map. results . iter ( ) {
1089
+ if Q :: cache_on_disk ( tcx, key. clone ( ) ) {
1090
+ let dep_node = SerializedDepNodeIndex :: new ( entry. index . index ( ) ) ;
1086
1091
1087
- let map = Q :: query_cache ( tcx) . borrow ( ) ;
1088
- assert ! ( map. active. is_empty( ) ) ;
1089
- for ( key, entry) in map. results . iter ( ) {
1090
- if Q :: cache_on_disk ( tcx, key. clone ( ) ) {
1091
- let dep_node = SerializedDepNodeIndex :: new ( entry. index . index ( ) ) ;
1092
+ // Record position of the cache entry
1093
+ query_result_index. push ( ( dep_node, AbsoluteBytePos :: new ( encoder. position ( ) ) ) ) ;
1092
1094
1093
- // Record position of the cache entry
1094
- query_result_index. push ( ( dep_node, AbsoluteBytePos :: new ( encoder. position ( ) ) ) ) ;
1095
-
1096
- // Encode the type check tables with the SerializedDepNodeIndex
1097
- // as tag.
1098
- encoder. encode_tagged ( dep_node, & entry. value ) ?;
1095
+ // Encode the type check tables with the SerializedDepNodeIndex
1096
+ // as tag.
1097
+ encoder. encode_tagged ( dep_node, & entry. value ) ?;
1098
+ }
1099
1099
}
1100
- }
1101
1100
1102
- Ok ( ( ) )
1101
+ Ok ( ( ) )
1103
1102
} )
1104
1103
}
0 commit comments