Remove likely! and unlikely! macro from compiler

This commit is contained in:
Gary Guo 2022-05-31 22:42:42 +01:00
parent aaf100597c
commit 8b7299dd12
5 changed files with 13 additions and 31 deletions

View file

@ -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()