@@ -85,12 +85,11 @@ use std::borrow::Borrow;
8585use std:: collections:: hash_map:: Entry ;
8686use std:: error:: Error ;
8787use std:: fmt:: Display ;
88- use std:: intrinsics:: unlikely;
8988use std:: path:: Path ;
9089use std:: sync:: Arc ;
9190use std:: sync:: atomic:: Ordering ;
9291use std:: time:: { Duration , Instant } ;
93- use std:: { fs, process} ;
92+ use std:: { fs, hint , process} ;
9493
9594pub use measureme:: EventId ;
9695use measureme:: { EventIdBuilder , Profiler , SerializableString , StringId } ;
@@ -427,7 +426,8 @@ impl SelfProfilerRef {
427426 . unwrap ( )
428427 . increment_query_cache_hit_counters ( QueryInvocationId ( query_invocation_id. 0 ) ) ;
429428 }
430- if unlikely ( profiler_ref. event_filter_mask . contains ( EventFilter :: QUERY_CACHE_HITS ) ) {
429+ if profiler_ref. event_filter_mask . contains ( EventFilter :: QUERY_CACHE_HITS ) {
430+ hint:: cold_path ( ) ;
431431 profiler_ref. instant_query_event (
432432 |profiler| profiler. query_cache_hit_event_kind ,
433433 query_invocation_id,
@@ -437,7 +437,8 @@ impl SelfProfilerRef {
437437
438438 // We check both kinds of query cache hit events at once, to reduce overhead in the
439439 // common case (with self-profile disabled).
440- if unlikely ( self . event_filter_mask . intersects ( EventFilter :: QUERY_CACHE_HIT_COMBINED ) ) {
440+ if self . event_filter_mask . intersects ( EventFilter :: QUERY_CACHE_HIT_COMBINED ) {
441+ hint:: cold_path ( ) ;
441442 cold_call ( self , query_invocation_id) ;
442443 }
443444 }
0 commit comments