Home
last modified time | relevance | path

Searched refs:tsd_tsdn (Results 1 – 23 of 23) sorted by relevance

/src/contrib/jemalloc/src/
H A Dprof_recent.c31 malloc_mutex_assert_owner(tsd_tsdn(tsd), &prof_recent_alloc_mtx); in prof_recent_alloc_max_get()
37 malloc_mutex_assert_owner(tsd_tsdn(tsd), &prof_recent_alloc_mtx); in prof_recent_alloc_max_update()
59 malloc_mutex_assert_owner(tsd_tsdn(tsd), tctx->tdata->lock); in increment_recent_count()
68 malloc_mutex_assert_owner(tsd_tsdn(tsd), tctx->tdata->lock); in prof_recent_alloc_prepare()
69 malloc_mutex_assert_not_owner(tsd_tsdn(tsd), &prof_recent_alloc_mtx); in prof_recent_alloc_prepare()
95 malloc_mutex_assert_not_owner(tsd_tsdn(tsd), &prof_recent_alloc_mtx); in decrement_recent_count()
97 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in decrement_recent_count()
116 malloc_mutex_assert_owner(tsd_tsdn(tsd), &prof_recent_alloc_mtx); in prof_recent_alloc_edata_get()
122 malloc_mutex_assert_owner(tsd_tsdn(tsd), &prof_recent_alloc_mtx); in prof_recent_alloc_edata_set()
146 malloc_mutex_assert_owner(tsd_tsdn(tsd), &prof_recent_alloc_mtx); in edata_prof_recent_alloc_get()
[all …]
H A Dbackground_thread.c235 malloc_mutex_assert_owner(tsd_tsdn(tsd),
238 malloc_mutex_assert_not_owner(tsd_tsdn(tsd),
243 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx);
253 malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx);
313 tsdn_t *tsdn = tsd_tsdn(tsd);
366 if (background_thread_pause_check(tsd_tsdn(tsd),
374 background_work_sleep_once(tsd_tsdn(tsd),
389 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx);
397 malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx);
408 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx);
[all …]
H A Dprof_data.c156 malloc_mutex_lock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_enter()
164 malloc_mutex_unlock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_leave()
177 prof_idump(tsd_tsdn(tsd)); in prof_leave()
180 prof_gdump(tsd_tsdn(tsd)); in prof_leave()
224 malloc_mutex_lock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_try_destroy()
233 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_try_destroy()
234 idalloctm(tsd_tsdn(tsd), gctx, NULL, NULL, true, true); in prof_gctx_try_destroy()
241 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_try_destroy()
277 tgctx.p = prof_gctx_create(tsd_tsdn(tsd), bt); in prof_lookup_global()
288 idalloctm(tsd_tsdn(tsd), gctx.v, NULL, NULL, in prof_lookup_global()
[all …]
H A Djemalloc.c457 arena_t *arena = arena_get(tsd_tsdn(tsd), ind, false); in arena_bind()
486 arena_decay(tsd_tsdn(tsd), oldarena, in arena_migrate()
495 arena = arena_get(tsd_tsdn(tsd), ind, false); in arena_unbind()
512 ret = arena_get(tsd_tsdn(tsd), choose, true); in arena_choose_hard()
538 malloc_mutex_lock(tsd_tsdn(tsd), &arenas_lock); in arena_choose_hard()
539 assert(arena_get(tsd_tsdn(tsd), 0, false) != NULL); in arena_choose_hard()
541 if (arena_get(tsd_tsdn(tsd), i, false) != NULL) { in arena_choose_hard()
548 tsd_tsdn(tsd), i, false), !!j) < in arena_choose_hard()
550 tsd_tsdn(tsd), choose[j], false), in arena_choose_hard()
570 if (arena_nthreads_get(arena_get(tsd_tsdn(tsd), in arena_choose_hard()
[all …]
H A Dprof_sys.c505 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_dump()
509 bool err = buf_writer_init(tsd_tsdn(tsd), &buf_writer, prof_dump_flush, in prof_dump()
514 buf_writer_terminate(tsd_tsdn(tsd), &buf_writer); in prof_dump()
521 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_dump()
564 const char *prefix = prof_prefix_get(tsd_tsdn(tsd)); in prof_dump_filename()
592 assert(!prof_prefix_is_empty(tsd_tsdn(tsd))); in prof_fdump_impl()
593 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_filename_mtx); in prof_fdump_impl()
595 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_filename_mtx); in prof_fdump_impl()
626 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_filename_mtx); in prof_idump_impl()
627 if (prof_prefix_get(tsd_tsdn(tsd))[0] == '\0') { in prof_idump_impl()
[all …]
H A Dtcache.c316 tsdn_t *tsdn = tsd_tsdn(tsd); in tcache_bin_flush_impl()
717 void *mem = ipallocztm(tsd_tsdn(tsd), size, alignment, true, NULL, in tsd_tcache_data_init()
736 arena = arena_get(tsd_tsdn(tsd), 0, false); in tsd_tcache_data_init()
737 tcache_arena_associate(tsd_tsdn(tsd), tcache_slow, tcache, in tsd_tcache_data_init()
743 tcache_arena_associate(tsd_tsdn(tsd), tcache_slow, in tsd_tcache_data_init()
766 void *mem = ipallocztm(tsd_tsdn(tsd), size, tcache_bin_alloc_alignment, in tcache_create_explicit()
776 tcache_arena_associate(tsd_tsdn(tsd), tcache_slow, tcache, in tcache_create_explicit()
811 tcache_arena_dissociate(tsd_tsdn(tsd), tcache_slow, tcache); in tcache_destroy()
817 idalloctm(tsd_tsdn(tsd), tcache_slow->dyn_alloc, NULL, NULL, true, in tcache_destroy()
826 arena_decay(tsd_tsdn(tsd), arena_get(tsd_tsdn(tsd), 0, false), in tcache_destroy()
[all …]
H A Dctl.c995 (struct container_s *)base_alloc(tsd_tsdn(tsd), in arenas_i_impl()
1003 ret = (ctl_arena_t *)base_alloc(tsd_tsdn(tsd), b0get(), in arenas_i_impl()
1280 if (arena_init(tsd_tsdn(tsd), arena_ind, config) == NULL) { in ctl_arena_init()
1389 tsdn_t *tsdn = tsd_tsdn(tsd); in ctl_init()
1567 ret = ctl_lookup(tsd_tsdn(tsd), super_root_node, name, &node, mib, in ctl_byname()
1593 ret = ctl_lookup(tsd_tsdn(tsd), super_root_node, name, NULL, mibp, in ctl_nametomib()
1646 ret = ctl_lookupbymib(tsd_tsdn(tsd), &node, mib, miblen); in ctl_bymib()
1674 ret = ctl_lookupbymib(tsd_tsdn(tsd), &node, mib, miblen); in ctl_mibnametomib()
1686 ret = ctl_lookup(tsd_tsdn(tsd), node, name, NULL, mib + miblen, in ctl_mibnametomib()
1704 ret = ctl_lookupbymib(tsd_tsdn(tsd), &node, mib, miblen); in ctl_bymibname()
[all …]
H A Dprof_log.c126 malloc_mutex_assert_owner(tsd_tsdn(tsd), &log_mtx); in prof_log_bt_index()
138 iallocztm(tsd_tsdn(tsd), sz, sz_size2index(sz), false, NULL, in prof_log_bt_index()
169 malloc_mutex_assert_owner(tsd_tsdn(tsd), &log_mtx); in prof_log_thr_index()
180 iallocztm(tsd_tsdn(tsd), sz, sz_size2index(sz), false, NULL, in prof_log_thr_index()
208 malloc_mutex_assert_owner(tsd_tsdn(tsd), tctx->tdata->lock); in prof_try_log()
220 malloc_mutex_lock(tsd_tsdn(tsd), &log_mtx); in prof_try_log()
243 iallocztm(tsd_tsdn(tsd), sz, sz_size2index(sz), false, NULL, true, in prof_try_log()
279 malloc_mutex_unlock(tsd_tsdn(tsd), &log_mtx); in prof_try_log()
419 prof_log_stop(tsd_tsdn(tsd)); in prof_log_stop_final()
511 idalloctm(tsd_tsdn(tsd), thr_old_node, NULL, NULL, true, true); in prof_log_emit_threads()
[all …]
H A Darena.c632 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset()
636 malloc_mutex_unlock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset()
637 arena_slab_dalloc(tsd_tsdn(tsd), arena, slab); in arena_bin_reset()
638 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset()
641 malloc_mutex_unlock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset()
642 arena_slab_dalloc(tsd_tsdn(tsd), arena, slab); in arena_bin_reset()
643 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset()
648 malloc_mutex_unlock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset()
649 arena_slab_dalloc(tsd_tsdn(tsd), arena, slab); in arena_bin_reset()
650 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset()
[all …]
H A Dprof.c92 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in prof_alloc_rollback()
107 edata_t *edata = emap_edata_lookup(tsd_tsdn(tsd), &arena_emap_global, in prof_malloc_sample_object()
113 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in prof_malloc_sample_object()
138 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); in prof_malloc_sample_object()
158 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in prof_free_sampled_object()
275 if (counter_accum(tsd_tsdn(tsd), &prof_idump_accumulated, elapsed)) { in prof_sample_event_handler()
276 prof_idump(tsd_tsdn(tsd)); in prof_sample_event_handler()
383 return prof_tdata_init_impl(tsd, prof_thr_uid_alloc(tsd_tsdn(tsd)), 0, in prof_tdata_init()
384 NULL, prof_thread_active_init_get(tsd_tsdn(tsd))); in prof_tdata_init()
667 gctx_locks = (malloc_mutex_t *)base_alloc(tsd_tsdn(tsd), base, in prof_boot2()
[all …]
H A Dckh.c282 tab = (ckhc_t *)ipallocztm(tsd_tsdn(tsd), usize, CACHELINE, in ckh_grow()
295 idalloctm(tsd_tsdn(tsd), tab, NULL, NULL, true, true); in ckh_grow()
300 idalloctm(tsd_tsdn(tsd), ckh->tab, NULL, NULL, true, true); in ckh_grow()
326 tab = (ckhc_t *)ipallocztm(tsd_tsdn(tsd), usize, CACHELINE, true, NULL, in ckh_shrink()
342 idalloctm(tsd_tsdn(tsd), tab, NULL, NULL, true, true); in ckh_shrink()
350 idalloctm(tsd_tsdn(tsd), ckh->tab, NULL, NULL, true, true); in ckh_shrink()
403 ckh->tab = (ckhc_t *)ipallocztm(tsd_tsdn(tsd), usize, CACHELINE, true, in ckh_new()
431 idalloctm(tsd_tsdn(tsd), ckh->tab, NULL, NULL, true, true); in ckh_delete()
H A Dtsd.c89 malloc_mutex_lock(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_add_nominal()
91 malloc_mutex_unlock(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_add_nominal()
98 malloc_mutex_lock(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_remove_nominal()
100 malloc_mutex_unlock(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_remove_nominal()
533 malloc_mutex_prefork(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_prefork()
538 malloc_mutex_postfork_parent(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_postfork_parent()
543 malloc_mutex_postfork_child(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_postfork_child()
H A Dprof_stats.c15 malloc_mutex_lock(tsd_tsdn(tsd), &prof_stats_mtx); in prof_stats_enter()
20 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_stats_mtx); in prof_stats_leave()
H A Dstats.c1930 if (counter_accum(tsd_tsdn(tsd), &stats_interval_accumulated, in stats_interval_event_handler()
/src/contrib/jemalloc/include/jemalloc/internal/
H A Djemalloc_internal_inlines_b.h15 arena_t *newarena = arena_get(tsd_tsdn(tsd), newind, true); in percpu_arena_update()
23 tcache_arena_reassociate(tsd_tsdn(tsd), tcache_slow, in percpu_arena_update()
41 return arena_get(tsd_tsdn(tsd), 0, true); in arena_choose_impl()
54 arena_get(tsd_tsdn(tsd), 0, false)); in arena_choose_impl()
56 tcache_arena_reassociate(tsd_tsdn(tsd), in arena_choose_impl()
60 tcache_arena_associate(tsd_tsdn(tsd), in arena_choose_impl()
74 tsd_tsdn(tsd))) { in arena_choose_impl()
80 ret->last_thd = tsd_tsdn(tsd); in arena_choose_impl()
H A Dtcache_inlines.h62 return arena_malloc_hard(tsd_tsdn(tsd), arena, size, in tcache_alloc_small()
68 ret = tcache_alloc_small_hard(tsd_tsdn(tsd), arena, tcache, in tcache_alloc_small()
78 assert(tcache_salloc(tsd_tsdn(tsd), ret) == usize); in tcache_alloc_small()
109 ret = large_malloc(tsd_tsdn(tsd), arena, sz_s2u(size), zero); in tcache_alloc_large()
131 assert(tcache_salloc(tsd_tsdn(tsd), ptr) <= SC_SMALL_MAXCLASS); in tcache_dalloc_small()
151 arena_dalloc_small(tsd_tsdn(tsd), ptr); in tcache_dalloc_small()
167 assert(tcache_salloc(tsd_tsdn(tsd), ptr) in tcache_dalloc_large()
169 assert(tcache_salloc(tsd_tsdn(tsd), ptr) <= tcache_maxclass); in tcache_dalloc_large()
H A Djemalloc_internal_inlines_c.h64 return iallocztm(tsd_tsdn(tsd), size, ind, zero, tcache_get(tsd), false, in ialloc()
96 return ipallocztm(tsd_tsdn(tsd), usize, alignment, zero, in ipalloc()
125 idalloctm(tsd_tsdn(tsd), ptr, tcache_get(tsd), NULL, false, true); in idalloc()
201 return iralloct(tsd_tsdn(tsd), ptr, oldsize, size, alignment, zero, in iralloc()
H A Dprof_inlines.h152 assert(usize == isalloc(tsd_tsdn(tsd), ptr)); in prof_malloc()
171 assert(usize == isalloc(tsd_tsdn(tsd), ptr)); in prof_realloc()
253 assert(usize == isalloc(tsd_tsdn(tsd), ptr)); in prof_free()
H A Darena_inlines_b.h53 edata = emap_edata_lookup(tsd_tsdn(tsd), &arena_emap_global, in arena_prof_info_get()
57 edata = emap_edata_lookup(tsd_tsdn(tsd), &arena_emap_global, in arena_prof_info_get()
82 edata_t *edata = emap_edata_lookup(tsd_tsdn(tsd), in arena_prof_tctx_reset()
89 edata_t *edata = emap_edata_lookup(tsd_tsdn(tsd), in arena_prof_tctx_reset()
101 edata_t *edata = emap_edata_lookup(tsd_tsdn(tsd), &arena_emap_global, in arena_prof_tctx_reset_sampled()
H A Demap.h290 bool err = rtree_metadata_try_read_fast(tsd_tsdn(tsd), &emap->rtree, in emap_alloc_ctx_try_lookup_fast()
334 result[i].rtree_leaf = rtree_leaf_elm_lookup(tsd_tsdn(tsd), in emap_edata_lookup_batch()
341 rtree_contents_t contents = rtree_leaf_elm_read(tsd_tsdn(tsd), in emap_edata_lookup_batch()
H A Djemalloc_internal_inlines_a.h113 assert(arena != arena_get(tsd_tsdn(tsd), 0, false)); in pre_reentrancy()
H A Dtsd.h283 tsd_tsdn(tsd_t *tsd) { in tsd_tsdn() function
466 return tsd_tsdn(tsd_fetch_impl(false, false)); in tsdn_fetch()
/src/contrib/jemalloc/
H A DFREEBSD-diffs508 ctl_postfork_child(tsd_tsdn(tsd));