Lines Matching refs:tsdn

140 static bool	prof_tctx_should_destroy(tsdn_t *tsdn, prof_tctx_t *tctx);
142 static bool prof_tdata_should_destroy(tsdn_t *tsdn, prof_tdata_t *tdata,
146 static char *prof_thread_name_alloc(tsdn_t *tsdn, const char *thread_name);
241 prof_malloc_sample_object(tsdn_t *tsdn, const void *ptr, size_t usize, in prof_malloc_sample_object() argument
243 prof_tctx_set(tsdn, ptr, usize, NULL, tctx); in prof_malloc_sample_object()
245 malloc_mutex_lock(tsdn, tctx->tdata->lock); in prof_malloc_sample_object()
253 malloc_mutex_unlock(tsdn, tctx->tdata->lock); in prof_malloc_sample_object()
553 prof_gctx_create(tsdn_t *tsdn, prof_bt_t *bt) { in prof_gctx_create() argument
558 prof_gctx_t *gctx = (prof_gctx_t *)iallocztm(tsdn, size, in prof_gctx_create()
614 prof_tctx_should_destroy(tsdn_t *tsdn, prof_tctx_t *tctx) { in prof_tctx_should_destroy() argument
615 malloc_mutex_assert_owner(tsdn, tctx->tdata->lock); in prof_tctx_should_destroy()
926 tsdn_t *tsdn; in prof_tdata_count() local
928 tsdn = tsdn_fetch(); in prof_tdata_count()
929 malloc_mutex_lock(tsdn, &tdatas_mtx); in prof_tdata_count()
932 malloc_mutex_unlock(tsdn, &tdatas_mtx); in prof_tdata_count()
1056 prof_tctx_merge_tdata(tsdn_t *tsdn, prof_tctx_t *tctx, prof_tdata_t *tdata) { in prof_tctx_merge_tdata() argument
1057 malloc_mutex_assert_owner(tsdn, tctx->tdata->lock); in prof_tctx_merge_tdata()
1059 malloc_mutex_lock(tsdn, tctx->gctx->lock); in prof_tctx_merge_tdata()
1063 malloc_mutex_unlock(tsdn, tctx->gctx->lock); in prof_tctx_merge_tdata()
1067 malloc_mutex_unlock(tsdn, tctx->gctx->lock); in prof_tctx_merge_tdata()
1087 prof_tctx_merge_gctx(tsdn_t *tsdn, prof_tctx_t *tctx, prof_gctx_t *gctx) { in prof_tctx_merge_gctx() argument
1088 malloc_mutex_assert_owner(tsdn, gctx->lock); in prof_tctx_merge_gctx()
1100 tsdn_t *tsdn = (tsdn_t *)arg; in prof_tctx_merge_iter() local
1102 malloc_mutex_assert_owner(tsdn, tctx->gctx->lock); in prof_tctx_merge_iter()
1110 prof_tctx_merge_gctx(tsdn, tctx, tctx->gctx); in prof_tctx_merge_iter()
1120 tsdn_t *tsdn; member
1129 malloc_mutex_assert_owner(arg->tsdn, tctx->gctx->lock); in prof_tctx_dump_iter()
1154 tsdn_t *tsdn = (tsdn_t *)arg; in prof_tctx_finish_iter() local
1157 malloc_mutex_assert_owner(tsdn, tctx->gctx->lock); in prof_tctx_finish_iter()
1179 prof_dump_gctx_prep(tsdn_t *tsdn, prof_gctx_t *gctx, prof_gctx_tree_t *gctxs) { in prof_dump_gctx_prep() argument
1182 malloc_mutex_lock(tsdn, gctx->lock); in prof_dump_gctx_prep()
1194 malloc_mutex_unlock(tsdn, gctx->lock); in prof_dump_gctx_prep()
1198 tsdn_t *tsdn; member
1207 malloc_mutex_lock(arg->tsdn, gctx->lock); in prof_gctx_merge_iter()
1209 (void *)arg->tsdn); in prof_gctx_merge_iter()
1213 malloc_mutex_unlock(arg->tsdn, gctx->lock); in prof_gctx_merge_iter()
1265 tsdn_t *tsdn; member
1275 malloc_mutex_lock(arg->tsdn, tdata->lock); in prof_tdata_merge_iter()
1287 prof_tctx_merge_tdata(arg->tsdn, tctx.p, tdata); in prof_tdata_merge_iter()
1299 malloc_mutex_unlock(arg->tsdn, tdata->lock); in prof_tdata_merge_iter()
1326 prof_dump_header_impl(tsdn_t *tsdn, bool propagate_err, in prof_dump_header_impl() argument
1338 malloc_mutex_lock(tsdn, &tdatas_mtx); in prof_dump_header_impl()
1341 malloc_mutex_unlock(tsdn, &tdatas_mtx); in prof_dump_header_impl()
1347 prof_dump_gctx(tsdn_t *tsdn, bool propagate_err, prof_gctx_t *gctx, in prof_dump_gctx() argument
1354 malloc_mutex_assert_owner(tsdn, gctx->lock); in prof_dump_gctx()
1388 prof_tctx_dump_iter_arg.tsdn = tsdn; in prof_dump_gctx()
1527 tsdn_t *tsdn; member
1537 malloc_mutex_lock(arg->tsdn, gctx->lock); in prof_gctx_dump_iter()
1539 if (prof_dump_gctx(arg->tsdn, arg->propagate_err, gctx, &gctx->bt, in prof_gctx_dump_iter()
1547 malloc_mutex_unlock(arg->tsdn, gctx->lock); in prof_gctx_dump_iter()
1577 prof_tdata_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1585 prof_gctx_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1612 prof_gctx_dump_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_file()
1762 prof_accum_init(tsdn_t *tsdn, prof_accum_t *prof_accum) { in prof_accum_init() argument
1778 prof_idump(tsdn_t *tsdn) { in prof_idump() argument
1784 if (!prof_booted || tsdn_null(tsdn) || !prof_active_get_unlocked()) { in prof_idump()
1787 tsd = tsdn_tsd(tsdn); in prof_idump()
1835 prof_gdump(tsdn_t *tsdn) { in prof_gdump() argument
1841 if (!prof_booted || tsdn_null(tsdn) || !prof_active_get_unlocked()) { in prof_gdump()
1844 tsd = tsdn_tsd(tsdn); in prof_gdump()
1860 malloc_mutex_lock(tsdn, &prof_dump_seq_mtx); in prof_gdump()
1863 malloc_mutex_unlock(tsdn, &prof_dump_seq_mtx); in prof_gdump()
1891 prof_thr_uid_alloc(tsdn_t *tsdn) { in prof_thr_uid_alloc() argument
1894 malloc_mutex_lock(tsdn, &next_thr_uid_mtx); in prof_thr_uid_alloc()
1897 malloc_mutex_unlock(tsdn, &next_thr_uid_mtx); in prof_thr_uid_alloc()
1966 prof_tdata_should_destroy(tsdn_t *tsdn, prof_tdata_t *tdata, in prof_tdata_should_destroy() argument
1968 malloc_mutex_assert_owner(tsdn, tdata->lock); in prof_tdata_should_destroy()
2036 prof_tdata_expire(tsdn_t *tsdn, prof_tdata_t *tdata) { in prof_tdata_expire() argument
2039 malloc_mutex_lock(tsdn, tdata->lock); in prof_tdata_expire()
2043 prof_tdata_should_destroy(tsdn, tdata, false); in prof_tdata_expire()
2047 malloc_mutex_unlock(tsdn, tdata->lock); in prof_tdata_expire()
2055 tsdn_t *tsdn = (tsdn_t *)arg; in prof_tdata_reset_iter() local
2057 return (prof_tdata_expire(tsdn, tdata) ? tdata : NULL); in prof_tdata_reset_iter()
2102 prof_active_get(tsdn_t *tsdn) { in prof_active_get() argument
2105 malloc_mutex_lock(tsdn, &prof_active_mtx); in prof_active_get()
2107 malloc_mutex_unlock(tsdn, &prof_active_mtx); in prof_active_get()
2112 prof_active_set(tsdn_t *tsdn, bool active) { in prof_active_set() argument
2115 malloc_mutex_lock(tsdn, &prof_active_mtx); in prof_active_set()
2118 malloc_mutex_unlock(tsdn, &prof_active_mtx); in prof_active_set()
2134 prof_thread_name_alloc(tsdn_t *tsdn, const char *thread_name) { in prof_thread_name_alloc() argument
2147 ret = iallocztm(tsdn, size, sz_size2index(size), false, NULL, true, in prof_thread_name_alloc()
2218 prof_thread_active_init_get(tsdn_t *tsdn) { in prof_thread_active_init_get() argument
2221 malloc_mutex_lock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_get()
2223 malloc_mutex_unlock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_get()
2228 prof_thread_active_init_set(tsdn_t *tsdn, bool active_init) { in prof_thread_active_init_set() argument
2231 malloc_mutex_lock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_set()
2234 malloc_mutex_unlock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_set()
2239 prof_gdump_get(tsdn_t *tsdn) { in prof_gdump_get() argument
2242 malloc_mutex_lock(tsdn, &prof_gdump_mtx); in prof_gdump_get()
2244 malloc_mutex_unlock(tsdn, &prof_gdump_mtx); in prof_gdump_get()
2249 prof_gdump_set(tsdn_t *tsdn, bool gdump) { in prof_gdump_set() argument
2252 malloc_mutex_lock(tsdn, &prof_gdump_mtx); in prof_gdump_set()
2255 malloc_mutex_unlock(tsdn, &prof_gdump_mtx); in prof_gdump_set()
2401 prof_prefork0(tsdn_t *tsdn) { in prof_prefork0() argument
2405 malloc_mutex_prefork(tsdn, &prof_dump_mtx); in prof_prefork0()
2406 malloc_mutex_prefork(tsdn, &bt2gctx_mtx); in prof_prefork0()
2407 malloc_mutex_prefork(tsdn, &tdatas_mtx); in prof_prefork0()
2409 malloc_mutex_prefork(tsdn, &tdata_locks[i]); in prof_prefork0()
2412 malloc_mutex_prefork(tsdn, &gctx_locks[i]); in prof_prefork0()
2418 prof_prefork1(tsdn_t *tsdn) { in prof_prefork1() argument
2420 malloc_mutex_prefork(tsdn, &prof_active_mtx); in prof_prefork1()
2421 malloc_mutex_prefork(tsdn, &prof_dump_seq_mtx); in prof_prefork1()
2422 malloc_mutex_prefork(tsdn, &prof_gdump_mtx); in prof_prefork1()
2423 malloc_mutex_prefork(tsdn, &next_thr_uid_mtx); in prof_prefork1()
2424 malloc_mutex_prefork(tsdn, &prof_thread_active_init_mtx); in prof_prefork1()
2429 prof_postfork_parent(tsdn_t *tsdn) { in prof_postfork_parent() argument
2433 malloc_mutex_postfork_parent(tsdn, in prof_postfork_parent()
2435 malloc_mutex_postfork_parent(tsdn, &next_thr_uid_mtx); in prof_postfork_parent()
2436 malloc_mutex_postfork_parent(tsdn, &prof_gdump_mtx); in prof_postfork_parent()
2437 malloc_mutex_postfork_parent(tsdn, &prof_dump_seq_mtx); in prof_postfork_parent()
2438 malloc_mutex_postfork_parent(tsdn, &prof_active_mtx); in prof_postfork_parent()
2440 malloc_mutex_postfork_parent(tsdn, &gctx_locks[i]); in prof_postfork_parent()
2443 malloc_mutex_postfork_parent(tsdn, &tdata_locks[i]); in prof_postfork_parent()
2445 malloc_mutex_postfork_parent(tsdn, &tdatas_mtx); in prof_postfork_parent()
2446 malloc_mutex_postfork_parent(tsdn, &bt2gctx_mtx); in prof_postfork_parent()
2447 malloc_mutex_postfork_parent(tsdn, &prof_dump_mtx); in prof_postfork_parent()
2452 prof_postfork_child(tsdn_t *tsdn) { in prof_postfork_child() argument
2456 malloc_mutex_postfork_child(tsdn, &prof_thread_active_init_mtx); in prof_postfork_child()
2457 malloc_mutex_postfork_child(tsdn, &next_thr_uid_mtx); in prof_postfork_child()
2458 malloc_mutex_postfork_child(tsdn, &prof_gdump_mtx); in prof_postfork_child()
2459 malloc_mutex_postfork_child(tsdn, &prof_dump_seq_mtx); in prof_postfork_child()
2460 malloc_mutex_postfork_child(tsdn, &prof_active_mtx); in prof_postfork_child()
2462 malloc_mutex_postfork_child(tsdn, &gctx_locks[i]); in prof_postfork_child()
2465 malloc_mutex_postfork_child(tsdn, &tdata_locks[i]); in prof_postfork_child()
2467 malloc_mutex_postfork_child(tsdn, &tdatas_mtx); in prof_postfork_child()
2468 malloc_mutex_postfork_child(tsdn, &bt2gctx_mtx); in prof_postfork_child()
2469 malloc_mutex_postfork_child(tsdn, &prof_dump_mtx); in prof_postfork_child()