Lines Matching refs:tsd_tsdn
332 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen()
334 if (prof_tctx_should_destroy(tsd_tsdn(tsd), tctx)) { in rb_gen()
337 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen()
367 malloc_mutex_assert_owner(tsd_tsdn(tsd), &log_mtx); in prof_log_bt_index()
379 iallocztm(tsd_tsdn(tsd), sz, sz_size2index(sz), false, NULL, in prof_log_bt_index()
409 malloc_mutex_assert_owner(tsd_tsdn(tsd), &log_mtx); in prof_log_thr_index()
420 iallocztm(tsd_tsdn(tsd), sz, sz_size2index(sz), false, NULL, in prof_log_thr_index()
445 malloc_mutex_assert_owner(tsd_tsdn(tsd), tctx->tdata->lock); in prof_try_log()
457 malloc_mutex_lock(tsd_tsdn(tsd), &log_mtx); in prof_try_log()
474 nstime_t alloc_time = prof_alloc_time_get(tsd_tsdn(tsd), ptr, in prof_try_log()
481 iallocztm(tsd_tsdn(tsd), sz, sz_size2index(sz), false, NULL, true, in prof_try_log()
517 malloc_mutex_unlock(tsd_tsdn(tsd), &log_mtx); in prof_try_log()
523 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in prof_free_sampled_object()
532 if (prof_tctx_should_destroy(tsd_tsdn(tsd), tctx)) { in prof_free_sampled_object()
535 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); in prof_free_sampled_object()
557 malloc_mutex_lock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_enter()
565 malloc_mutex_unlock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_leave()
578 prof_idump(tsd_tsdn(tsd)); in prof_leave()
581 prof_gdump(tsd_tsdn(tsd)); in prof_leave()
859 malloc_mutex_lock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_try_destroy()
868 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_try_destroy()
869 idalloctm(tsd_tsdn(tsd), gctx, NULL, NULL, true, true); in prof_gctx_try_destroy()
876 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_try_destroy()
917 malloc_mutex_assert_owner(tsd_tsdn(tsd), tctx->tdata->lock); in prof_tctx_destroy()
926 destroy_tdata = prof_tdata_should_destroy(tsd_tsdn(tsd), tdata, false); in prof_tctx_destroy()
927 malloc_mutex_unlock(tsd_tsdn(tsd), tdata->lock); in prof_tctx_destroy()
929 malloc_mutex_lock(tsd_tsdn(tsd), gctx->lock); in prof_tctx_destroy()
970 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_tctx_destroy()
976 malloc_mutex_assert_not_owner(tsd_tsdn(tsd), tctx->tdata->lock); in prof_tctx_destroy()
983 idalloctm(tsd_tsdn(tsd), tctx, NULL, NULL, true, true); in prof_tctx_destroy()
1004 tgctx.p = prof_gctx_create(tsd_tsdn(tsd), bt); in prof_lookup_global()
1015 idalloctm(tsd_tsdn(tsd), gctx.v, NULL, NULL, in prof_lookup_global()
1033 malloc_mutex_lock(tsd_tsdn(tsd), gctx.p->lock); in prof_lookup_global()
1035 malloc_mutex_unlock(tsd_tsdn(tsd), gctx.p->lock); in prof_lookup_global()
1040 idalloctm(tsd_tsdn(tsd), tgctx.v, NULL, NULL, true, in prof_lookup_global()
1068 malloc_mutex_lock(tsd_tsdn(tsd), tdata->lock); in prof_lookup()
1073 malloc_mutex_unlock(tsd_tsdn(tsd), tdata->lock); in prof_lookup()
1089 ret.v = iallocztm(tsd_tsdn(tsd), sizeof(prof_tctx_t), in prof_lookup()
1106 malloc_mutex_lock(tsd_tsdn(tsd), tdata->lock); in prof_lookup()
1108 malloc_mutex_unlock(tsd_tsdn(tsd), tdata->lock); in prof_lookup()
1113 idalloctm(tsd_tsdn(tsd), ret.v, NULL, NULL, true, true); in prof_lookup()
1116 malloc_mutex_lock(tsd_tsdn(tsd), gctx->lock); in prof_lookup()
1120 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_lookup()
1219 malloc_mutex_lock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_bt_count()
1221 malloc_mutex_unlock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_bt_count()
1502 malloc_mutex_lock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_finish()
1511 (void *)tsd_tsdn(tsd)); in prof_gctx_finish()
1517 idalloctm(tsd_tsdn(tsd), to_destroy, in prof_gctx_finish()
1527 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_finish()
1530 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_finish()
1841 prof_dump_gctx_prep(tsd_tsdn(tsd), gctx.p, gctxs); in prof_dump_prep()
1848 prof_tdata_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1850 malloc_mutex_lock(tsd_tsdn(tsd), &tdatas_mtx); in prof_dump_prep()
1853 malloc_mutex_unlock(tsd_tsdn(tsd), &tdatas_mtx); in prof_dump_prep()
1856 prof_gctx_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1877 if (prof_dump_header(tsd_tsdn(tsd), propagate_err, in prof_dump_file()
1883 prof_gctx_dump_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_file()
1917 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_dump()
1930 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_dump()
2026 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_fdump()
2028 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_fdump()
2074 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_idump()
2077 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_idump()
2096 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_mdump()
2099 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_mdump()
2208 tdata = (prof_tdata_t *)iallocztm(tsd_tsdn(tsd), sizeof(prof_tdata_t), in prof_tdata_init_impl()
2225 idalloctm(tsd_tsdn(tsd), tdata, NULL, NULL, true, true); in prof_tdata_init_impl()
2239 malloc_mutex_lock(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_init_impl()
2241 malloc_mutex_unlock(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_init_impl()
2248 return prof_tdata_init_impl(tsd, prof_thr_uid_alloc(tsd_tsdn(tsd)), 0, in prof_tdata_init()
2249 NULL, prof_thread_active_init_get(tsd_tsdn(tsd))); in prof_tdata_init()
2274 malloc_mutex_assert_owner(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_destroy_locked()
2281 idalloctm(tsd_tsdn(tsd), tdata->thread_name, NULL, NULL, true, in prof_tdata_destroy_locked()
2285 idalloctm(tsd_tsdn(tsd), tdata, NULL, NULL, true, true); in prof_tdata_destroy_locked()
2290 malloc_mutex_lock(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_destroy()
2292 malloc_mutex_unlock(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_destroy()
2299 malloc_mutex_lock(tsd_tsdn(tsd), tdata->lock); in prof_tdata_detach()
2301 destroy_tdata = prof_tdata_should_destroy(tsd_tsdn(tsd), tdata, in prof_tdata_detach()
2314 malloc_mutex_unlock(tsd_tsdn(tsd), tdata->lock); in prof_tdata_detach()
2325 prof_thread_name_alloc(tsd_tsdn(tsd), tdata->thread_name) : NULL; in prof_tdata_reinit()
2364 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_reset()
2365 malloc_mutex_lock(tsd_tsdn(tsd), &tdatas_mtx); in prof_reset()
2381 malloc_mutex_unlock(tsd_tsdn(tsd), &tdatas_mtx); in prof_reset()
2382 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_reset()
2555 prof_log_stop(tsd_tsdn(tsd)); in prof_log_stop_final()
2838 s = prof_thread_name_alloc(tsd_tsdn(tsd), thread_name); in prof_thread_name_set()
2844 idalloctm(tsd_tsdn(tsd), tdata->thread_name, NULL, NULL, true, in prof_thread_name_set()
3019 prof_log_start(tsd_tsdn(tsd), NULL); in prof_boot2()
3047 gctx_locks = (malloc_mutex_t *)base_alloc(tsd_tsdn(tsd), in prof_boot2()
3061 tdata_locks = (malloc_mutex_t *)base_alloc(tsd_tsdn(tsd), in prof_boot2()