23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT 140 for (j = 0; j < ts->
ats_nr; ++j) {
160 for (
i = 0;
i <
nr; ++
i) {
168 for (
i = 0;
i <
nr; ++
i) {
171 "#%dbe_ut_alloc",
i);
174 for (
i = 0;
i <
nr; ++
i) {
196 const char *optype_str,
204 "m0_be_allocator_credit(): " 205 "optype = %d (%s), size = %" PRIi64 ", shift = %d, " 229 for (shift = 0; shift <= 12; shift += 1) {
254 uint64_t ptrs_nr = 0;
266 &ptrs[ptrs_nr], alloc_size)));
267 if (ptrs[ptrs_nr] ==
NULL)
275 for (
i = 0;
i < ptrs_nr; ++
i) {
363 "ut_alloc_spare #%d do free ptrs[%d] %p",
400 #undef M0_TRACE_SUBSYSTEM
void m0_be_ut_seg_fini(struct m0_be_ut_seg *ut_seg)
static struct m0_addb2_philter p
#define M0_ALLOC_ARR(arr, nr)
struct m0t1fs_fsync_interactions fi
M0_INTERNAL void m0_be_ut_alloc_init_fini(void)
static bool m0_addr_is_aligned(const void *addr, unsigned shift)
int m0_thread_join(struct m0_thread *q)
#define M0_LOG(level,...)
M0_INTERNAL void m0_be_alloc_stats_capture(struct m0_be_allocator *a, struct m0_be_tx *tx)
struct m0_be_seg * bus_seg
M0_INTERNAL void m0_be_ut_alloc_spare(void)
#define M0_BE_OP_SYNC(op_obj, action)
M0_INTERNAL void m0_be_alloc_stats(struct m0_be_allocator *a, struct m0_be_allocator_stats *out)
struct m0_be_ut_seg ut_seg
void m0_be_ut_seg_init(struct m0_be_ut_seg *ut_seg, struct m0_be_ut_backend *ut_be, m0_bcount_t size)
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
M0_INTERNAL void m0_be_alloc_aligned(struct m0_be_allocator *a, struct m0_be_tx *tx, struct m0_be_op *op, void **ptr, m0_bcount_t size, unsigned shift, uint64_t zonemask)
M0_INTERNAL uint64_t m0_round_up(uint64_t val, uint64_t size)
m0_bcount_t bas_space_used
void * ats_ptr[BE_UT_ALLOC_PTR_NR]
void m0_be_ut_seg_allocator_fini(struct m0_be_ut_seg *ut_seg, struct m0_be_ut_backend *ut_be)
struct m0_thread ats_thread
M0_INTERNAL int m0_pagesize_get(void)
static void be_ut_alloc_mt(int nr)
static struct m0_be_ut_seg be_ut_alloc_seg
M0_INTERNAL m0_bcount_t m0_be_seg_reserved(const struct m0_be_seg *seg)
M0_INTERNAL void m0_be_alloc_stats_credit(struct m0_be_allocator *a, struct m0_be_tx_credit *accum)
static struct m0_be_ut_backend be_ut_alloc_backend
struct m0_be_ut_backend ut_be
M0_INTERNAL struct m0_be_allocator * m0_be_seg_allocator(struct m0_be_seg *seg)
M0_INTERNAL void m0_be_alloc(struct m0_be_allocator *a, struct m0_be_tx *tx, struct m0_be_op *op, void **ptr, m0_bcount_t size)
void m0_thread_fini(struct m0_thread *q)
static struct be_ut_alloc_thread_state be_ut_ts[BE_UT_ALLOC_THR_NR]
void m0_be_ut_backend_init(struct m0_be_ut_backend *ut_be)
void m0_be_ut_seg_allocator_init(struct m0_be_ut_seg *ut_seg, struct m0_be_ut_backend *ut_be)
static void be_ut_alloc_credit_log(struct m0_be_allocator *a, enum m0_be_allocator_op optype, const char *optype_str, m0_bcount_t size, unsigned shift)
M0_INTERNAL void m0_be_ut_alloc_create_destroy(void)
M0_INTERNAL void m0_be_ut_alloc_concurrent(void)
static void be_ut_alloc_oom_case(struct m0_be_allocator *a, m0_bcount_t alloc_size)
struct m0_be_seg * ba_seg
M0_INTERNAL void m0_be_ut_alloc_info(void)
M0_INTERNAL uint64_t m0_rnd64(uint64_t *seed)
M0_INTERNAL void m0_be_free(struct m0_be_allocator *a, struct m0_be_tx *tx, struct m0_be_op *op, void *ptr)
#define M0_BE_UT_TRANSACT(__ut_be, __tx, __cred, __credit_func, __action_func)
M0_INTERNAL void m0_be_ut_alloc_multiple(void)
static void be_ut_alloc_ptr_handle(struct m0_be_allocator *a, void **p, uint64_t *seed)
static void be_ut_alloc_thread(int index)
void m0_be_ut_backend_fini(struct m0_be_ut_backend *ut_be)
M0_INTERNAL void m0_be_free_aligned(struct m0_be_allocator *a, struct m0_be_tx *tx, struct m0_be_op *op, void *ptr)
static void m0_fi_enable_once(const char *func, const char *tag)
static struct m0_be_seg * seg
M0_INTERNAL void m0_be_ut_alloc_oom(void)
M0_INTERNAL int m0_be_allocator_init(struct m0_be_allocator *a, struct m0_be_seg *seg)
M0_INTERNAL void m0_be_allocator_credit(struct m0_be_allocator *a, enum m0_be_allocator_op optype, m0_bcount_t size, unsigned shift, struct m0_be_tx_credit *accum)
m0_bcount_t bas_space_free
void m0_be_ut_backend_thread_exit(struct m0_be_ut_backend *ut_be)
M0_INTERNAL void m0_be_allocator_fini(struct m0_be_allocator *a)