Home
last modified time | relevance | path

Searched refs:UNLIKELY (Results 1 – 25 of 98) sorted by relevance

1234

/freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/
H A Dmem_map_fuchsia.cpp44 if (UNLIKELY(!Result)) { in getRootVmarBase()
64 if (UNLIKELY(Vmo == ZX_HANDLE_INVALID)) { in getPlaceholderVmo()
67 if (UNLIKELY(Status != ZX_OK)) in getPlaceholderVmo()
76 if (UNLIKELY(OldValue != ZX_HANDLE_INVALID)) { in getPlaceholderVmo()
99 if (UNLIKELY(Status != ZX_OK)) in MemMapFuchsia()
113 if (UNLIKELY(Status != ZX_OK)) { in mapImpl()
128 if (UNLIKELY(Status != ZX_OK)) { in mapImpl()
199 if (UNLIKELY(Status != ZX_OK)) { in remapImpl()
239 if (UNLIKELY(Status != ZX_OK)) { in createImpl()
H A Dcombined.h74 if (UNLIKELY(Header.State != Chunk::State::Quarantined)) in recycle()
94 if (UNLIKELY(!Ptr)) in allocate()
107 if (UNLIKELY(useMemoryTagging<AllocatorConfig>( in allocate()
121 if (UNLIKELY(Header.State != Chunk::State::Allocated)) in deallocate()
150 if (UNLIKELY(!getRandom(&Cookie, sizeof(Cookie)))) in init()
340 if (UNLIKELY(Alignment > MaxAlignment)) {
349 if (UNLIKELY(GuardedAlloc.shouldSample())) {
376 if (UNLIKELY(Size >= MaxAllowedMallocSize)) {
394 if (UNLIKELY(!Block)) {
401 if (UNLIKELY(ClassId == 0)) {
[all …]
H A Dfuchsia.cpp53 if (UNLIKELY(Status != ZX_OK)) { in allocateVmar()
92 if (UNLIKELY(Status != ZX_OK)) { in map()
110 if (UNLIKELY(Status != ZX_OK)) { in map()
131 if (UNLIKELY(Status != ZX_OK)) { in map()
157 if (UNLIKELY(Status != ZX_OK)) in unmap()
222 if (UNLIKELY(!Buffer || !Length || Length > MaxRandomLength)) in getRandom()
H A Drss_limit_checker.cpp
H A Dinternal_defs.h40 #define UNLIKELY(X) __builtin_expect(!!(X), 0) macro
98 if (UNLIKELY(!(Expr))) { \
110 if (UNLIKELY(!(C1 Op C2))) { \
/freebsd/contrib/llvm-project/compiler-rt/lib/dfsan/
H A Ddfsan_allocator.cpp101 if (UNLIKELY(IsRssLimitExceeded())) { in DFsanAllocate()
117 if (UNLIKELY(!allocated)) { in DFsanAllocate()
175 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in DFsanCalloc()
231 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in dfsan_reallocarray()
248 if (UNLIKELY(CheckForPvallocOverflow(size, PageSize))) { in dfsan_pvalloc()
261 if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(alignment, size))) { in dfsan_aligned_alloc()
272 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in dfsan_memalign()
283 if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) { in dfsan_posix_memalign()
290 if (UNLIKELY(!ptr)) in dfsan_posix_memalign()
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_allocator_local_cache.h38 if (UNLIKELY(c->count == 0)) { in Allocate()
39 if (UNLIKELY(!Refill(c, allocator, class_id))) in Allocate()
56 if (UNLIKELY(c->count == c->max_count)) in Deallocate()
103 if (UNLIKELY(!allocator->GetFromAllocator(&stats_, class_id, c->chunks, in Refill()
163 if (UNLIKELY(c->count == 0)) { in Allocate()
164 if (UNLIKELY(!Refill(c, allocator, class_id))) in Allocate()
181 if (UNLIKELY(c->count == c->max_count)) in Deallocate()
245 if (UNLIKELY(!b)) in Refill()
262 if (UNLIKELY(!b)) { in Drain()
H A Dsanitizer_mutex.h189 if (UNLIKELY(!atomic_compare_exchange_weak(&state_, &state, new_state, in Lock()
214 if (UNLIKELY(state & (kWriterLock | kReaderLockMask))) in TryLock()
245 } while (UNLIKELY(!atomic_compare_exchange_weak(&state_, &state, new_state, in Unlock()
247 if (UNLIKELY(wake_writer)) in Unlock()
249 else if (UNLIKELY(wake_readers)) in Unlock()
273 if (UNLIKELY(!atomic_compare_exchange_weak(&state_, &state, new_state, in ReadLock()
304 } while (UNLIKELY(!atomic_compare_exchange_weak(&state_, &state, new_state, in ReadUnlock()
306 if (UNLIKELY(wake)) in ReadUnlock()
H A Dsanitizer_leb128.h28 if (UNLIKELY(begin == end)) in EncodeSLEB128()
41 if (UNLIKELY(begin == end)) in DecodeSLEB128()
61 if (UNLIKELY(begin == end)) in EncodeULEB128()
74 if (UNLIKELY(begin == end)) in DecodeULEB128()
H A Dsanitizer_allocator_primary32.h174 if (UNLIKELY(!PopulateFreeList(stat, c, sci, class_id))) in AllocateBatch()
302 if (UNLIKELY(!res)) in AllocateRegion()
327 if (UNLIKELY(!b)) in PopulateBatches()
344 if (UNLIKELY(!region)) in PopulateFreeList()
347 if (UNLIKELY(sci->rand_state == 0)) in PopulateFreeList()
361 if (UNLIKELY(!PopulateBatches(c, sci, class_id, &b, max_count, in PopulateFreeList()
368 if (UNLIKELY(!PopulateBatches(c, sci, class_id, &b, max_count, in PopulateFreeList()
H A Dsanitizer_allocator.cpp88 if (UNLIKELY(!p)) in InternalAlloc()
95 if (UNLIKELY(!p)) in InternalRealloc()
102 if (UNLIKELY(CheckForCallocOverflow(count, size))) { in InternalReallocArray()
113 if (UNLIKELY(CheckForCallocOverflow(count, size))) { in InternalCalloc()
H A Dsanitizer_posix.cpp51 if (UNLIKELY(internal_iserror(res, &reserrno))) in MmapOrDie()
61 if (UNLIKELY(internal_iserror(res, &reserrno))) in UnmapOrDie()
71 if (UNLIKELY(internal_iserror(res, &reserrno))) { in MmapOrDieOnFatalError()
94 if (UNLIKELY(!map_res)) in MmapAlignedOrDieOnFatalError()
116 if (UNLIKELY(internal_iserror(p, &reserrno))) in MmapNoReserveOrDie()
129 if (UNLIKELY(internal_iserror(p, &reserrno))) { in MmapFixedImpl()
H A Dsanitizer_allocator_primary64.h186 if (UNLIKELY(!EnsureFreeArraySpace(region, region_beg, in ReturnToAllocator()
219 if (UNLIKELY(region->num_freed_chunks < n_chunks)) { in GetFromAllocator()
220 if (UNLIKELY(!PopulateFreeArray(stat, class_id, region, in GetFromAllocator()
716 if (UNLIKELY(!mapped)) in MapWithCallback()
749 if (UNLIKELY(!MapWithCallback(current_map_end, new_map_size, in EnsureFreeArraySpace()
782 if (UNLIKELY(region->mapped_user == 0)) { in PopulateFreeArray()
798 if (UNLIKELY(IsRegionExhausted(region, class_id, user_map_size))) in PopulateFreeArray()
800 if (UNLIKELY(!MapWithCallback(region_beg + region->mapped_user, in PopulateFreeArray()
818 if (UNLIKELY(IsRegionExhausted(region, class_id, meta_map_size))) in PopulateFreeArray()
820 if (UNLIKELY(!MapWithCallback( in PopulateFreeArray()
[all …]
H A Dsanitizer_allocator_size_class_map.h149 if (UNLIKELY(class_id == kBatchClassID)) in Size()
159 if (UNLIKELY(size > kMaxSize)) in ClassID()
172 if (UNLIKELY(size == 0)) in MaxCachedHint()
H A Dsanitizer_allocator_dlsym.h25 return !SANITIZER_FUCHSIA && UNLIKELY(Details::UseImpl()); in Use()
31 UNLIKELY(internal_allocator()->FromPrimary(ptr)); in PointerIsMine()
/freebsd/contrib/llvm-project/compiler-rt/lib/xray/
H A Dxray_function_call_trie.h360 if (UNLIKELY(OverflowedFunctions)) { in enterFunction()
367 if (UNLIKELY(ShadowStack.empty())) { in enterFunction()
370 if (UNLIKELY(NewRoot == nullptr)) in enterFunction()
404 if (UNLIKELY(NewNode == nullptr)) in enterFunction()
498 if (UNLIKELY(NewRoot == nullptr)) in deepCopyInto()
501 if (UNLIKELY(O.Roots.Append(NewRoot) == nullptr)) in deepCopyInto()
518 if (UNLIKELY(NewNode == nullptr)) in deepCopyInto()
520 if (UNLIKELY(NP.NewNode->Callees.AppendEmplace(NewNode, Callee.FId) == in deepCopyInto()
523 if (UNLIKELY(DFSStack.AppendEmplace(Callee.NodePtr, NewNode) == in deepCopyInto()
557 if (UNLIKELY(TargetRoot == nullptr)) in mergeInto()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/lsan/
H A Dlsan_allocator.cpp96 if (UNLIKELY(IsRssLimitExceeded())) { in Allocate()
102 if (UNLIKELY(!p)) { in Allocate()
116 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in Calloc()
181 if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) { in lsan_posix_memalign()
187 if (UNLIKELY(!ptr)) in lsan_posix_memalign()
196 if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(alignment, size))) { in lsan_aligned_alloc()
206 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in lsan_memalign()
229 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in lsan_reallocarray()
249 if (UNLIKELY(CheckForPvallocOverflow(size, PageSize))) { in lsan_pvalloc()
/freebsd/contrib/llvm-project/compiler-rt/lib/msan/
H A Dmsan_allocator.cpp186 if (UNLIKELY(size > max_malloc_size)) { in MsanAllocate()
194 if (UNLIKELY(IsRssLimitExceeded())) { in MsanAllocate()
210 if (UNLIKELY(!allocated)) { in MsanAllocate()
294 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in MsanCalloc()
350 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in msan_reallocarray()
366 if (UNLIKELY(CheckForPvallocOverflow(size, PageSize))) { in msan_pvalloc()
379 if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(alignment, size))) { in msan_aligned_alloc()
390 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in msan_memalign()
402 if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) { in msan_posix_memalign()
409 if (UNLIKELY(!ptr)) in msan_posix_memalign()
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_rtl_access.cpp25 if (UNLIKELY(!TraceAcquire(thr, &ev))) in TryTraceMemoryAccess()
62 if (UNLIKELY(!TraceAcquire(thr, &ev))) in TryTraceMemoryAccessRange()
322 if (UNLIKELY(race_mask)) in CheckRaces()
344 if (UNLIKELY(index == 0)) { in CheckRaces()
348 if (UNLIKELY(index == 0)) in CheckRaces()
438 if (UNLIKELY(fast_state.GetIgnoreBit())) in MemoryAccess()
458 if (UNLIKELY(fast_state.GetIgnoreBit())) in MemoryAccess16()
470 if (UNLIKELY(CheckRaces(thr, shadow_mem, cur, shadow, access, typ))) in MemoryAccess16()
495 if (UNLIKELY(fast_state.GetIgnoreBit())) in UnalignedMemoryAccess()
508 if (UNLIKELY(CheckRaces(thr, shadow_mem, cur, shadow, access, typ))) in UnalignedMemoryAccess()
[all …]
H A Dtsan_mman.cpp203 if (UNLIKELY(IsRssLimitExceeded())) { in user_alloc_internal()
210 if (UNLIKELY(!p)) { in user_alloc_internal()
238 if (UNLIKELY(CheckForCallocOverflow(size, n))) { in user_calloc()
251 if (UNLIKELY(CheckForCallocOverflow(size, n))) { in user_reallocarray()
312 if (UNLIKELY(!IsPowerOfTwo(align))) { in user_memalign()
324 if (UNLIKELY(!CheckPosixMemalignAlignment(align))) { in user_posix_memalign()
331 if (UNLIKELY(!ptr)) in user_posix_memalign()
340 if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(align, sz))) { in user_aligned_alloc()
356 if (UNLIKELY(CheckForPvallocOverflow(sz, PageSize))) { in user_pvalloc()
H A Dtsan_interceptors.h14 if (UNLIKELY(ignoring_)) in DisableIgnores()
18 if (UNLIKELY(ignoring_)) in EnableIgnores()
41 return UNLIKELY(cur_thread_init()->in_symbolizer); in in_symbolizer()
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/
H A Dasan_interceptors_memintrinsics.h29 if (UNLIKELY(size == 0 || size > sizeof(uptr) * ASAN_SHADOW_GRANULARITY)) in DECLARE_REAL()
60 if (UNLIKELY(__offset > __offset + __size)) { \ in DECLARE_REAL()
64 if (UNLIKELY(!QuickCheckForUnpoisonedRegion(__offset, __size)) && \ in DECLARE_REAL()
98 if (UNLIKELY(RangesOverlap(offset1, length1, offset2, length2))) { \ in DECLARE_REAL()
/freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_allocator.cpp186 if (UNLIKELY(orig_size == 0)) in HwasanAllocate()
188 if (UNLIKELY(orig_size > max_malloc_size)) { in HwasanAllocate()
196 if (UNLIKELY(IsRssLimitExceeded())) { in HwasanAllocate()
213 if (UNLIKELY(!allocated)) { in HwasanAllocate()
355 UNLIKELY((tag < kShadowAlignment || tag == pointer_tag) && tag != 0)); in HwasanDeallocate()
396 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in HwasanCalloc()
470 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in hwasan_reallocarray()
486 if (UNLIKELY(CheckForPvallocOverflow(size, PageSize))) { in hwasan_pvalloc()
498 if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(alignment, size))) { in hwasan_aligned_alloc()
508 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in hwasan_memalign()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/memprof/
H A Dmemprof_interceptors_memintrinsics.cpp28 if (UNLIKELY(!memprof_inited)) \
42 if (UNLIKELY(!memprof_inited)) \
54 if (UNLIKELY(!memprof_inited)) \
H A Dmemprof_allocator.cpp410 if (UNLIKELY(!memprof_inited)) in Allocate()
412 if (UNLIKELY(IsRssLimitExceeded())) { in Allocate()
457 if (UNLIKELY(!allocated)) { in Allocate()
567 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in Calloc()
671 if (UNLIKELY(CheckForCallocOverflow(size, nmemb))) { in memprof_reallocarray()
701 if (UNLIKELY(CheckForPvallocOverflow(size, PageSize))) { in memprof_pvalloc()
714 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in memprof_memalign()
725 if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(alignment, size))) { in memprof_aligned_alloc()
736 if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) { in memprof_posix_memalign()
742 if (UNLIKELY(!ptr)) in memprof_posix_memalign()

1234