File tree 2 files changed +4
-2
lines changed
rustc_data_structures/src
rustc_query_system/src/query
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,7 @@ impl SelfProfilerRef {
393
393
}
394
394
395
395
/// Record a query in-memory cache hit.
396
- #[ inline( always ) ]
396
+ #[ inline( never ) ]
397
397
pub fn query_cache_hit ( & self , query_invocation_id : QueryInvocationId ) {
398
398
self . instant_query_event (
399
399
|profiler| profiler. query_cache_hit_event_kind ,
Original file line number Diff line number Diff line change @@ -722,7 +722,9 @@ where
722
722
}
723
723
Some ( ( _, dep_node_index) ) => {
724
724
dep_graph. read_index ( dep_node_index) ;
725
- qcx. dep_context ( ) . profiler ( ) . query_cache_hit ( dep_node_index. into ( ) ) ;
725
+ if std:: intrinsics:: unlikely ( qcx. dep_context ( ) . profiler ( ) . enabled ( ) ) {
726
+ qcx. dep_context ( ) . profiler ( ) . query_cache_hit ( dep_node_index. into ( ) ) ;
727
+ }
726
728
( false , None )
727
729
}
728
730
}
You can’t perform that action at this time.
0 commit comments