about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/profiling.rs
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2022-05-31 22:42:42 +0100
committerGary Guo <gary@garyguo.net>2022-06-18 04:52:11 +0100
commit8b7299dd12b06b2f41707dda8562e0182c9d5672 (patch)
tree6e0decb0010aa7d143bb068be0423fa061e333bf /compiler/rustc_data_structures/src/profiling.rs
parentaaf100597cc6986d5ebd005d58a9394dd6edef4d (diff)
downloadrust-8b7299dd12b06b2f41707dda8562e0182c9d5672.tar.gz
rust-8b7299dd12b06b2f41707dda8562e0182c9d5672.zip
Remove `likely!` and `unlikely!` macro from compiler
Diffstat (limited to 'compiler/rustc_data_structures/src/profiling.rs')
-rw-r--r--compiler/rustc_data_structures/src/profiling.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/profiling.rs b/compiler/rustc_data_structures/src/profiling.rs
index a1f42d8d3c0..88ff33b4d09 100644
--- a/compiler/rustc_data_structures/src/profiling.rs
+++ b/compiler/rustc_data_structures/src/profiling.rs
@@ -195,6 +195,7 @@ impl SelfProfilerRef {
         F: for<'a> FnOnce(&'a SelfProfiler) -> TimingGuard<'a>,
     {
         #[inline(never)]
+        #[cold]
         fn cold_call<F>(profiler_ref: &SelfProfilerRef, f: F) -> TimingGuard<'_>
         where
             F: for<'a> FnOnce(&'a SelfProfiler) -> TimingGuard<'a>,
@@ -203,7 +204,7 @@ impl SelfProfilerRef {
             f(&**profiler)
         }
 
-        if unlikely!(self.event_filter_mask.contains(event_filter)) {
+        if self.event_filter_mask.contains(event_filter) {
             cold_call(self, f)
         } else {
             TimingGuard::none()