/freebsd/contrib/jemalloc/include/jemalloc/internal/ |
H A D | tcache_inlines.h | 36 if (unlikely(ticker_tick(&tcache->gc_ticker))) { in tcache_event() 53 if (unlikely(!tcache_success)) { in tcache_alloc_small() 56 if (unlikely(arena == NULL)) { in tcache_alloc_small() 72 if (config_prof || (slow_path && config_fill) || unlikely(zero)) { in tcache_alloc_small() 79 if (unlikely(opt_junk_alloc)) { in tcache_alloc_small() 82 } else if (unlikely(opt_zero)) { in tcache_alloc_small() 87 if (slow_path && config_fill && unlikely(opt_junk_alloc)) { in tcache_alloc_small() 114 if (unlikely(!tcache_success)) { in tcache_alloc_large() 120 if (unlikely(arena == NULL)) { in tcache_alloc_large() 133 unlikely(zero)) { in tcache_alloc_large() [all …]
|
H A D | prof_inlines_b.h | 25 if (unlikely(tdata == NULL)) { in prof_tdata_get() 30 } else if (unlikely(tdata->expired)) { in prof_tdata_get() 114 if (unlikely((uintptr_t)tdata <= (uintptr_t)PROF_TDATA_STATE_MAX)) { in prof_sample_accum_update() 122 if (unlikely(tdata == NULL)) { in prof_sample_accum_update() 172 if (unlikely((uintptr_t)tctx > (uintptr_t)1U)) { in prof_malloc() 208 if (unlikely(sampled)) { in prof_realloc() 213 } else if (unlikely(old_sampled)) { in prof_realloc() 233 if (unlikely(old_sampled)) { in prof_realloc() 245 if (unlikely((uintptr_t)tctx > (uintptr_t)1U)) { in prof_free()
|
H A D | arena_inlines_b.h | 27 if (unlikely(size >= oversize_threshold)) { in arena_choose_maybe_huge() 45 if (unlikely(!extent_slab_get(extent))) { in arena_prof_tctx_get() 49 if (unlikely(!alloc_ctx->slab)) { in arena_prof_tctx_get() 65 if (unlikely(!extent_slab_get(extent))) { in arena_prof_tctx_set() 69 if (unlikely(!alloc_ctx->slab)) { in arena_prof_tctx_set() 117 if (unlikely(tsdn_null(tsdn))) { in arena_decay_ticks() 122 if (unlikely(decay_ticker == NULL)) { in arena_decay_ticks() 125 if (unlikely(ticker_ticks(decay_ticker, nticks))) { in arena_decay_ticks() 233 if (config_prof && unlikely(szind < SC_NBINS)) { in arena_dalloc_large_no_tcache() 273 if (config_prof && unlikely(szind < SC_NBINS)) { in arena_dalloc_large() [all …]
|
/freebsd/sys/dev/mlx5/mlx5_en/ |
H A D | mlx5_en_tx.c | 186 if (unlikely(mb->m_len < ETHER_HDR_LEN)) { in mlx5e_get_l2_header_size() 189 if (unlikely(mb->m_len < (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN))) in mlx5e_get_l2_header_size() 248 if (unlikely(mb->m_len < ETHER_HDR_LEN)) in mlx5e_get_full_header_size() 251 if (unlikely(mb->m_len < ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)) in mlx5e_get_full_header_size() 263 if (unlikely(mb->m_len < eth_hdr_len + sizeof(*ip))) in mlx5e_get_full_header_size() 281 if (unlikely(mb->m_len < eth_hdr_len + sizeof(*ip6))) in mlx5e_get_full_header_size() 299 if (unlikely(mb->m_len < eth_hdr_len + sizeof(*th))) { in mlx5e_get_full_header_size() 301 if (unlikely(mb->m_len != eth_hdr_len || in mlx5e_get_full_header_size() 316 if (unlikely(mb->m_pkthdr.len < eth_hdr_len)) in mlx5e_get_full_header_size() 334 if (unlikely(m in mlx5e_parse_mbuf_chain() [all...] |
/freebsd/sys/contrib/ena-com/ |
H A D | ena_com.c | 118 if (unlikely((addr & GENMASK_ULL(ena_dev->dma_addr_bits - 1, 0)) != addr)) { in ena_com_mem_addr_set() 138 if (unlikely(!sq->entries)) { in ena_com_admin_init_sq() 161 if (unlikely(!cq->entries)) { in ena_com_admin_init_cq() 186 if (unlikely(!aenq->entries)) { in ena_com_admin_init_aenq() 207 if (unlikely(!aenq_handlers)) { in ena_com_admin_init_aenq() 228 if (unlikely(command_id >= admin_queue->q_depth)) { in get_comp_ctxt() 235 if (unlikely(!admin_queue->comp_ctx)) { in get_comp_ctxt() 241 if (unlikely(admin_queue->comp_ctx[command_id].occupied && capture)) { in get_comp_ctxt() 272 if (unlikely(cnt >= admin_queue->q_depth)) { in __ena_com_submit_admin_cmd() 287 if (unlikely(!comp_ctx)) in __ena_com_submit_admin_cmd() [all …]
|
H A D | ena_eth_com.c | 87 if (unlikely(!io_sq->entries_in_tx_burst_left)) { in ena_com_write_bounce_buffer_to_dev() 113 if (unlikely((io_sq->tail & (io_sq->q_depth - 1)) == 0)) in ena_com_write_bounce_buffer_to_dev() 128 if (unlikely(io_sq->mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_HOST)) in ena_com_write_header_to_bounce() 134 if (unlikely((header_offset + header_len) > llq_info->desc_list_entry_size)) { in ena_com_write_header_to_bounce() 140 if (unlikely(!bounce_buffer)) { in ena_com_write_header_to_bounce() 159 if (unlikely(!bounce_buffer)) { in get_sq_desc_llq() 178 if (unlikely(io_sq->mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_HOST)) in ena_com_close_bounce_buffer() 185 if (unlikely(rc)) { in ena_com_close_bounce_buffer() 219 if (unlikely(rc)) { in ena_com_sq_update_llq_tail() 231 if (unlikely(llq_info->desc_stride_ctrl == ENA_ADMIN_SINGLE_DESC_PER_ENTRY)) in ena_com_sq_update_llq_tail() [all …]
|
/freebsd/sys/contrib/dpdk_rte_lpm/ |
H A D | rte_branch_prediction.h | 28 * Check if a branch is unlikely to be taken. 31 * unlikely to be taken. Example: 33 * if (unlikely(x < 1)) 37 #ifndef unlikely 38 #define unlikely(x) __builtin_expect(!!(x), 0) macro 39 #endif /* unlikely */
|
/freebsd/sys/dev/drm2/ttm/ |
H A D | ttm_bo_vm.c | 89 if (unlikely(best_bo == NULL)) in ttm_bo_vm_lookup_rb() 92 if (unlikely((best_bo->vm_node->start + best_bo->num_pages) < in ttm_bo_vm_lookup_rb() 123 if (unlikely(ret != 0)) { in ttm_bo_vm_fault() 171 if (unlikely(ret != 0)) { in ttm_bo_vm_fault() 179 if (unlikely(ret != 0)) { in ttm_bo_vm_fault() 184 if (unlikely(ret != 0)) { in ttm_bo_vm_fault() 222 if (unlikely(!m)) { in ttm_bo_vm_fault() 329 if (unlikely(bo == NULL)) { in ttm_bo_mmap_single() 335 if (unlikely(!driver->verify_access)) { in ttm_bo_mmap_single() 340 if (unlikely(ret != 0)) in ttm_bo_mmap_single() [all …]
|
/freebsd/sys/contrib/openzfs/include/os/linux/spl/sys/ |
H A D | debug.h | 100 #define unlikely(expr) expect((expr) != 0, 0) macro 107 (void) (unlikely(!(cond)) && \ 112 if (unlikely(!(cond))) \ 120 if (unlikely(!(_verify3_left OP _verify3_right))) \ 131 if (unlikely(!(_verify3_left OP _verify3_right))) \ 142 if (unlikely(!(_verify3_left OP _verify3_right))) \ 153 if (unlikely(!(_verify3_left OP _verify3_right))) \ 163 if (unlikely(!(0 == _verify0_right))) \ 172 if (unlikely(!(0 == _verify0_right))) \ 190 if (unlikely(!(_verify3_left OP _verify3_right))) \ [all …]
|
/freebsd/contrib/ofed/libmlx5/ |
H A D | qp.c | 77 if (unlikely(!(*size))) in copy_to_scat() 99 if (unlikely(qp->wq_sig)) in mlx5_copy_to_recv_wqe() 139 if (unlikely((void *)(scat + max) > qp->sq.qend)) { in mlx5_copy_to_send_wqe() 251 if (unlikely(src == qp->sq.qend)) in mlx5_bf_copy() 290 if (unlikely(inl > qp->max_inline_data)) in set_data_inl_seg() 293 if (unlikely(wqe + len > qend)) { in set_data_inl_seg() 368 if (unlikely(wr->num_sge < 1)) { in copy_eth_inline_headers() 389 if (unlikely(inl_hdr_size)) { in copy_eth_inline_headers() 402 if (unlikely(wr->sg_list[j].length == inl_hdr_copy_size)) { in copy_eth_inline_headers() 545 if (unlikely((*seg == qend))) in set_bind_wr() [all …]
|
/freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/ |
H A D | debug.h | 103 (void) (unlikely(!(cond)) && \ 108 if (unlikely(!(cond))) \ 116 if (unlikely(!(_verify3_left OP _verify3_right))) \ 127 if (unlikely(!(_verify3_left OP _verify3_right))) \ 138 if (unlikely(!(_verify3_left OP _verify3_right))) \ 149 if (unlikely(!(_verify3_left OP _verify3_right))) \ 159 if (unlikely(!(0 == _verify0_right))) \ 168 if (unlikely(!(0 == _verify0_right))) \ 186 if (unlikely(!(_verify3_left OP _verify3_right))) \ 198 if (unlikely(!(_verify3_left OP _verify3_right))) \ [all …]
|
/freebsd/sys/dev/ena/ |
H A D | ena.c | 218 if (unlikely(dma_space_addr == 0)) in ena_dma_alloc() 233 if (unlikely(error != 0)) { in ena_dma_alloc() 239 if (unlikely(error != 0)) { in ena_dma_alloc() 247 if (unlikely(error != 0)) { in ena_dma_alloc() 256 if (unlikely((error != 0) || (dma->paddr == 0))) { in ena_dma_alloc() 574 if (unlikely(tx_req_id_rc != 0)) { in validate_tx_req_id() 653 if (unlikely(tx_ring->tx_buffer_info == NULL)) in ena_setup_tx_resources() 658 if (unlikely(tx_ring->free_tx_ids == NULL)) in ena_setup_tx_resources() 664 if (unlikely(tx_ring->push_buf_intermediate_buf == NULL)) in ena_setup_tx_resources() 688 if (unlikely(err != 0)) { in ena_setup_tx_resources() [all …]
|
H A D | ena_rss.c | 108 if (unlikely(rc != 0)) { in ena_rss_init_default() 121 if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { in ena_rss_init_default() 139 if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { in ena_rss_init_default() 145 if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { in ena_rss_init_default() 169 if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { in ena_rss_configure() 180 if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) in ena_rss_configure() 185 if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) in ena_rss_configure() 190 if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) in ena_rss_configure() 205 if (unlikely(dc == NULL)) { in ena_rss_init_default_deferred() 216 if (unlikely(rc != 0)) { in ena_rss_init_default_deferred()
|
H A D | ena_datapath.c | 92 if (unlikely(((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) || in ena_cleanup() 105 if (unlikely(((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) || in ena_cleanup() 146 if (unlikely((if_getdrvflags(adapter->ifp) & IFF_DRV_RUNNING) == 0)) in ena_mq_start() 171 if (unlikely(ret != 0)) { in ena_mq_start() 214 if (unlikely(rc == ENA_COM_TRY_AGAIN)) in ena_get_tx_req_id() 219 if (unlikely(tx_ring->tx_buffer_info[*req_id].mbuf == NULL)) { in ena_get_tx_req_id() 271 if (unlikely(rc != 0)) in ena_tx_cleanup() 296 if (unlikely(--commit == 0)) { in ena_tx_cleanup() 327 if (unlikely(!tx_ring->running && above_thresh)) { in ena_tx_cleanup() 436 if (unlikely(rx_info->mbuf == NULL)) { in ena_rx_mbuf() [all …]
|
H A D | ena_netmap.c | 116 if (unlikely(rx_info->netmap_buf_idx != 0)) in ena_netmap_alloc_rx_slot() 330 if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, ctx.adapter))) in ena_netmap_txsync() 333 if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_LINK_UP, ctx.adapter))) in ena_netmap_txsync() 413 if (unlikely(rc != 0)) { in ena_netmap_tx_frame() 433 if (unlikely(rc != 0)) { in ena_netmap_tx_frame() 508 if (unlikely(slot_vaddr == NULL)) in ena_netmap_copy_data() 531 if (unlikely(vaddr == NULL)) { in ena_netmap_map_single_slot() 537 if (unlikely(rc != 0)) { in ena_netmap_map_single_slot() 598 if (unlikely(push_hdr == NULL)) { in ena_netmap_tx_map_slots() 611 if (unlikely(rc)) { in ena_netmap_tx_map_slots() [all …]
|
/freebsd/sys/dev/qat/qat_common/ |
H A D | adf_pfvf_vf_proto.c | 188 if (unlikely(type != ADF_PF2VF_BLKMSG_RESP_TYPE_DATA)) { in adf_vf2pf_blkmsg_get_byte() 218 if (unlikely(type != ADF_PF2VF_BLKMSG_RESP_TYPE_CRC)) { in adf_vf2pf_blkmsg_get_crc() 258 if (unlikely(type > ADF_VF2PF_LARGE_BLOCK_TYPE_MAX)) { in adf_send_vf2pf_blkmsg_req() 265 if (unlikely(*buffer_len < ADF_PFVF_BLKMSG_HEADER_SIZE)) { in adf_send_vf2pf_blkmsg_req() 275 if (unlikely(ret)) in adf_send_vf2pf_blkmsg_req() 278 if (unlikely(!buffer[ADF_PFVF_BLKMSG_VER_BYTE])) { in adf_send_vf2pf_blkmsg_req() 289 if (unlikely(ret)) in adf_send_vf2pf_blkmsg_req() 292 if (unlikely(!buffer[ADF_PFVF_BLKMSG_LEN_BYTE])) { in adf_send_vf2pf_blkmsg_req() 316 if (unlikely(ret)) in adf_send_vf2pf_blkmsg_req() 321 if (unlikely(ret)) in adf_send_vf2pf_blkmsg_req() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
H A D | mem_map_fuchsia.cpp | 44 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 D | combined.h | 74 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 …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_allocator_local_cache.h | 38 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()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/dfsan/ |
H A D | dfsan_allocator.cpp | 101 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/jemalloc/src/ |
H A D | jemalloc.c | 181 if (unlikely(opt_utrace)) { \ 219 if (unlikely(malloc_init_state == malloc_init_uninitialized)) { in malloc_init_a0() 227 if (unlikely(!malloc_initialized()) && malloc_init_hard()) { in malloc_init() 240 if (unlikely(malloc_init_a0())) { in a0ialloc() 271 if (unlikely(size == 0)) { in bootstrap_malloc() 283 if (unlikely(num_size == 0)) { in bootstrap_calloc() 293 if (unlikely(ptr == NULL)) { in bootstrap_free() 1948 if (unlikely(dopts->alignment != 0)) { in imalloc_no_sample() 1978 if (unlikely(ret == NULL)) { in imalloc_sample() 2012 if (unlikely(*size == 0)) { in compute_size_with_overflow() [all …]
|
H A D | large.c | 31 if (unlikely(ausize == 0 || ausize > SC_LARGE_MAXCLASS)) { in large_palloc() 35 if (config_fill && unlikely(opt_zero)) { in large_palloc() 47 if (unlikely(arena == NULL) || (extent = arena_extent_alloc_large(tsdn, in large_palloc() 65 } else if (config_fill && unlikely(opt_junk_alloc)) { in large_palloc() 82 if (config_fill && have_dss && unlikely(opt_junk_free)) { in large_dalloc_maybe_junk_impl() 117 if (config_fill && unlikely(opt_junk_free)) { in large_ralloc_no_move_shrink() 142 if (config_fill && unlikely(opt_zero)) { in large_ralloc_no_move_expand() 208 } else if (config_fill && unlikely(opt_junk_alloc)) { in large_ralloc_no_move_expand()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/lsan/ |
H A D | lsan_allocator.cpp | 96 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 D | msan_allocator.cpp | 186 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 D | tsan_rtl_access.cpp | 25 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 …]
|