File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
rustc_data_structures/src
rustc_query_system/src/query Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,7 @@ impl SelfProfilerRef {
393393 }
394394
395395 /// Record a query in-memory cache hit.
396- #[ inline( always ) ]
396+ #[ inline( never ) ]
397397 pub fn query_cache_hit ( & self , query_invocation_id : QueryInvocationId ) {
398398 self . instant_query_event (
399399 |profiler| profiler. query_cache_hit_event_kind ,
Original file line number Diff line number Diff line change @@ -722,7 +722,9 @@ where
722722 }
723723 Some ( ( _, dep_node_index) ) => {
724724 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+ }
726728 ( false , None )
727729 }
728730 }
You can’t perform that action at this time.
0 commit comments