Lines Matching refs:tsdn

236 static bool	prof_tctx_should_destroy(tsdn_t *tsdn, prof_tctx_t *tctx);
238 static bool prof_tdata_should_destroy(tsdn_t *tsdn, prof_tdata_t *tdata,
242 static char *prof_thread_name_alloc(tsdn_t *tsdn, const char *thread_name);
343 prof_malloc_sample_object(tsdn_t *tsdn, const void *ptr, size_t usize, in prof_malloc_sample_object() argument
345 prof_tctx_set(tsdn, ptr, usize, NULL, tctx); in prof_malloc_sample_object()
351 prof_alloc_time_set(tsdn, ptr, NULL, t); in prof_malloc_sample_object()
353 malloc_mutex_lock(tsdn, tctx->tdata->lock); in prof_malloc_sample_object()
361 malloc_mutex_unlock(tsdn, tctx->tdata->lock); in prof_malloc_sample_object()
821 prof_gctx_create(tsdn_t *tsdn, prof_bt_t *bt) { in prof_gctx_create() argument
826 prof_gctx_t *gctx = (prof_gctx_t *)iallocztm(tsdn, size, in prof_gctx_create()
882 prof_tctx_should_destroy(tsdn_t *tsdn, prof_tctx_t *tctx) { in prof_tctx_should_destroy() argument
883 malloc_mutex_assert_owner(tsdn, tctx->tdata->lock); in prof_tctx_should_destroy()
1196 tsdn_t *tsdn; in prof_tdata_count() local
1198 tsdn = tsdn_fetch(); in prof_tdata_count()
1199 malloc_mutex_lock(tsdn, &tdatas_mtx); in prof_tdata_count()
1202 malloc_mutex_unlock(tsdn, &tdatas_mtx); in prof_tdata_count()
1327 prof_tctx_merge_tdata(tsdn_t *tsdn, prof_tctx_t *tctx, prof_tdata_t *tdata) { in prof_tctx_merge_tdata() argument
1328 malloc_mutex_assert_owner(tsdn, tctx->tdata->lock); in prof_tctx_merge_tdata()
1330 malloc_mutex_lock(tsdn, tctx->gctx->lock); in prof_tctx_merge_tdata()
1334 malloc_mutex_unlock(tsdn, tctx->gctx->lock); in prof_tctx_merge_tdata()
1338 malloc_mutex_unlock(tsdn, tctx->gctx->lock); in prof_tctx_merge_tdata()
1358 prof_tctx_merge_gctx(tsdn_t *tsdn, prof_tctx_t *tctx, prof_gctx_t *gctx) { in prof_tctx_merge_gctx() argument
1359 malloc_mutex_assert_owner(tsdn, gctx->lock); in prof_tctx_merge_gctx()
1371 tsdn_t *tsdn = (tsdn_t *)arg; in prof_tctx_merge_iter() local
1373 malloc_mutex_assert_owner(tsdn, tctx->gctx->lock); in prof_tctx_merge_iter()
1381 prof_tctx_merge_gctx(tsdn, tctx, tctx->gctx); in prof_tctx_merge_iter()
1391 tsdn_t *tsdn; member
1400 malloc_mutex_assert_owner(arg->tsdn, tctx->gctx->lock); in prof_tctx_dump_iter()
1425 tsdn_t *tsdn = (tsdn_t *)arg; in prof_tctx_finish_iter() local
1428 malloc_mutex_assert_owner(tsdn, tctx->gctx->lock); in prof_tctx_finish_iter()
1450 prof_dump_gctx_prep(tsdn_t *tsdn, prof_gctx_t *gctx, prof_gctx_tree_t *gctxs) { in prof_dump_gctx_prep() argument
1453 malloc_mutex_lock(tsdn, gctx->lock); in prof_dump_gctx_prep()
1465 malloc_mutex_unlock(tsdn, gctx->lock); in prof_dump_gctx_prep()
1469 tsdn_t *tsdn; member
1478 malloc_mutex_lock(arg->tsdn, gctx->lock); in prof_gctx_merge_iter()
1480 (void *)arg->tsdn); in prof_gctx_merge_iter()
1484 malloc_mutex_unlock(arg->tsdn, gctx->lock); in prof_gctx_merge_iter()
1536 tsdn_t *tsdn; member
1546 malloc_mutex_lock(arg->tsdn, tdata->lock); in prof_tdata_merge_iter()
1558 prof_tctx_merge_tdata(arg->tsdn, tctx.p, tdata); in prof_tdata_merge_iter()
1570 malloc_mutex_unlock(arg->tsdn, tdata->lock); in prof_tdata_merge_iter()
1597 prof_dump_header_impl(tsdn_t *tsdn, bool propagate_err, in prof_dump_header_impl() argument
1609 malloc_mutex_lock(tsdn, &tdatas_mtx); in prof_dump_header_impl()
1612 malloc_mutex_unlock(tsdn, &tdatas_mtx); in prof_dump_header_impl()
1618 prof_dump_gctx(tsdn_t *tsdn, bool propagate_err, prof_gctx_t *gctx, in prof_dump_gctx() argument
1625 malloc_mutex_assert_owner(tsdn, gctx->lock); in prof_dump_gctx()
1659 prof_tctx_dump_iter_arg.tsdn = tsdn; in prof_dump_gctx()
1798 tsdn_t *tsdn; member
1808 malloc_mutex_lock(arg->tsdn, gctx->lock); in prof_gctx_dump_iter()
1810 if (prof_dump_gctx(arg->tsdn, arg->propagate_err, gctx, &gctx->bt, in prof_gctx_dump_iter()
1818 malloc_mutex_unlock(arg->tsdn, gctx->lock); in prof_gctx_dump_iter()
1848 prof_tdata_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1856 prof_gctx_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1883 prof_gctx_dump_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_file()
2033 prof_accum_init(tsdn_t *tsdn, prof_accum_t *prof_accum) { in prof_accum_init() argument
2049 prof_idump(tsdn_t *tsdn) { in prof_idump() argument
2055 if (!prof_booted || tsdn_null(tsdn) || !prof_active_get_unlocked()) { in prof_idump()
2058 tsd = tsdn_tsd(tsdn); in prof_idump()
2106 prof_gdump(tsdn_t *tsdn) { in prof_gdump() argument
2112 if (!prof_booted || tsdn_null(tsdn) || !prof_active_get_unlocked()) { in prof_gdump()
2115 tsd = tsdn_tsd(tsdn); in prof_gdump()
2131 malloc_mutex_lock(tsdn, &prof_dump_seq_mtx); in prof_gdump()
2134 malloc_mutex_unlock(tsdn, &prof_dump_seq_mtx); in prof_gdump()
2189 prof_thr_uid_alloc(tsdn_t *tsdn) { in prof_thr_uid_alloc() argument
2192 malloc_mutex_lock(tsdn, &next_thr_uid_mtx); in prof_thr_uid_alloc()
2195 malloc_mutex_unlock(tsdn, &next_thr_uid_mtx); in prof_thr_uid_alloc()
2264 prof_tdata_should_destroy(tsdn_t *tsdn, prof_tdata_t *tdata, in prof_tdata_should_destroy() argument
2266 malloc_mutex_assert_owner(tsdn, tdata->lock); in prof_tdata_should_destroy()
2334 prof_tdata_expire(tsdn_t *tsdn, prof_tdata_t *tdata) { in prof_tdata_expire() argument
2337 malloc_mutex_lock(tsdn, tdata->lock); in prof_tdata_expire()
2341 prof_tdata_should_destroy(tsdn, tdata, false); in prof_tdata_expire()
2345 malloc_mutex_unlock(tsdn, tdata->lock); in prof_tdata_expire()
2353 tsdn_t *tsdn = (tsdn_t *)arg; in prof_tdata_reset_iter() local
2355 return (prof_tdata_expire(tsdn, tdata) ? tdata : NULL); in prof_tdata_reset_iter()
2400 prof_active_get(tsdn_t *tsdn) { in prof_active_get() argument
2403 malloc_mutex_lock(tsdn, &prof_active_mtx); in prof_active_get()
2405 malloc_mutex_unlock(tsdn, &prof_active_mtx); in prof_active_get()
2410 prof_active_set(tsdn_t *tsdn, bool active) { in prof_active_set() argument
2413 malloc_mutex_lock(tsdn, &prof_active_mtx); in prof_active_set()
2416 malloc_mutex_unlock(tsdn, &prof_active_mtx); in prof_active_set()
2517 prof_log_start(tsdn_t *tsdn, const char *filename) { in prof_log_start() argument
2525 malloc_mutex_lock(tsdn, &log_mtx); in prof_log_start()
2546 malloc_mutex_unlock(tsdn, &log_mtx); in prof_log_start()
2696 prof_log_stop(tsdn_t *tsdn) { in prof_log_stop() argument
2701 tsd_t *tsd = tsdn_tsd(tsdn); in prof_log_stop()
2702 malloc_mutex_lock(tsdn, &log_mtx); in prof_log_stop()
2705 malloc_mutex_unlock(tsdn, &log_mtx); in prof_log_stop()
2715 malloc_mutex_unlock(tsdn, &log_mtx); in prof_log_stop()
2770 malloc_mutex_lock(tsdn, &log_mtx); in prof_log_stop()
2772 malloc_mutex_unlock(tsdn, &log_mtx); in prof_log_stop()
2794 prof_thread_name_alloc(tsdn_t *tsdn, const char *thread_name) { in prof_thread_name_alloc() argument
2807 ret = iallocztm(tsdn, size, sz_size2index(size), false, NULL, true, in prof_thread_name_alloc()
2878 prof_thread_active_init_get(tsdn_t *tsdn) { in prof_thread_active_init_get() argument
2881 malloc_mutex_lock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_get()
2883 malloc_mutex_unlock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_get()
2888 prof_thread_active_init_set(tsdn_t *tsdn, bool active_init) { in prof_thread_active_init_set() argument
2891 malloc_mutex_lock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_set()
2894 malloc_mutex_unlock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_set()
2899 prof_gdump_get(tsdn_t *tsdn) { in prof_gdump_get() argument
2902 malloc_mutex_lock(tsdn, &prof_gdump_mtx); in prof_gdump_get()
2904 malloc_mutex_unlock(tsdn, &prof_gdump_mtx); in prof_gdump_get()
2909 prof_gdump_set(tsdn_t *tsdn, bool gdump) { in prof_gdump_set() argument
2912 malloc_mutex_lock(tsdn, &prof_gdump_mtx); in prof_gdump_set()
2915 malloc_mutex_unlock(tsdn, &prof_gdump_mtx); in prof_gdump_set()
3088 prof_prefork0(tsdn_t *tsdn) { in prof_prefork0() argument
3092 malloc_mutex_prefork(tsdn, &prof_dump_mtx); in prof_prefork0()
3093 malloc_mutex_prefork(tsdn, &bt2gctx_mtx); in prof_prefork0()
3094 malloc_mutex_prefork(tsdn, &tdatas_mtx); in prof_prefork0()
3096 malloc_mutex_prefork(tsdn, &tdata_locks[i]); in prof_prefork0()
3099 malloc_mutex_prefork(tsdn, &gctx_locks[i]); in prof_prefork0()
3105 prof_prefork1(tsdn_t *tsdn) { in prof_prefork1() argument
3107 malloc_mutex_prefork(tsdn, &prof_active_mtx); in prof_prefork1()
3108 malloc_mutex_prefork(tsdn, &prof_dump_seq_mtx); in prof_prefork1()
3109 malloc_mutex_prefork(tsdn, &prof_gdump_mtx); in prof_prefork1()
3110 malloc_mutex_prefork(tsdn, &next_thr_uid_mtx); in prof_prefork1()
3111 malloc_mutex_prefork(tsdn, &prof_thread_active_init_mtx); in prof_prefork1()
3116 prof_postfork_parent(tsdn_t *tsdn) { in prof_postfork_parent() argument
3120 malloc_mutex_postfork_parent(tsdn, in prof_postfork_parent()
3122 malloc_mutex_postfork_parent(tsdn, &next_thr_uid_mtx); in prof_postfork_parent()
3123 malloc_mutex_postfork_parent(tsdn, &prof_gdump_mtx); in prof_postfork_parent()
3124 malloc_mutex_postfork_parent(tsdn, &prof_dump_seq_mtx); in prof_postfork_parent()
3125 malloc_mutex_postfork_parent(tsdn, &prof_active_mtx); in prof_postfork_parent()
3127 malloc_mutex_postfork_parent(tsdn, &gctx_locks[i]); in prof_postfork_parent()
3130 malloc_mutex_postfork_parent(tsdn, &tdata_locks[i]); in prof_postfork_parent()
3132 malloc_mutex_postfork_parent(tsdn, &tdatas_mtx); in prof_postfork_parent()
3133 malloc_mutex_postfork_parent(tsdn, &bt2gctx_mtx); in prof_postfork_parent()
3134 malloc_mutex_postfork_parent(tsdn, &prof_dump_mtx); in prof_postfork_parent()
3139 prof_postfork_child(tsdn_t *tsdn) { in prof_postfork_child() argument
3143 malloc_mutex_postfork_child(tsdn, &prof_thread_active_init_mtx); in prof_postfork_child()
3144 malloc_mutex_postfork_child(tsdn, &next_thr_uid_mtx); in prof_postfork_child()
3145 malloc_mutex_postfork_child(tsdn, &prof_gdump_mtx); in prof_postfork_child()
3146 malloc_mutex_postfork_child(tsdn, &prof_dump_seq_mtx); in prof_postfork_child()
3147 malloc_mutex_postfork_child(tsdn, &prof_active_mtx); in prof_postfork_child()
3149 malloc_mutex_postfork_child(tsdn, &gctx_locks[i]); in prof_postfork_child()
3152 malloc_mutex_postfork_child(tsdn, &tdata_locks[i]); in prof_postfork_child()
3154 malloc_mutex_postfork_child(tsdn, &tdatas_mtx); in prof_postfork_child()
3155 malloc_mutex_postfork_child(tsdn, &bt2gctx_mtx); in prof_postfork_child()
3156 malloc_mutex_postfork_child(tsdn, &prof_dump_mtx); in prof_postfork_child()