Lines Matching refs:tsd_tsdn
230 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen()
232 if (prof_tctx_should_destroy(tsd_tsdn(tsd), tctx)) { in rb_gen()
235 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen()
258 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in prof_free_sampled_object()
264 if (prof_tctx_should_destroy(tsd_tsdn(tsd), tctx)) { in prof_free_sampled_object()
267 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); in prof_free_sampled_object()
289 malloc_mutex_lock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_enter()
297 malloc_mutex_unlock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_leave()
310 prof_idump(tsd_tsdn(tsd)); in prof_leave()
313 prof_gdump(tsd_tsdn(tsd)); in prof_leave()
591 malloc_mutex_lock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_try_destroy()
600 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_try_destroy()
601 idalloctm(tsd_tsdn(tsd), gctx, NULL, NULL, true, true); in prof_gctx_try_destroy()
608 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_try_destroy()
649 malloc_mutex_assert_owner(tsd_tsdn(tsd), tctx->tdata->lock); in prof_tctx_destroy()
658 destroy_tdata = prof_tdata_should_destroy(tsd_tsdn(tsd), tdata, false); in prof_tctx_destroy()
659 malloc_mutex_unlock(tsd_tsdn(tsd), tdata->lock); in prof_tctx_destroy()
661 malloc_mutex_lock(tsd_tsdn(tsd), gctx->lock); in prof_tctx_destroy()
702 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_tctx_destroy()
708 malloc_mutex_assert_not_owner(tsd_tsdn(tsd), tctx->tdata->lock); in prof_tctx_destroy()
715 idalloctm(tsd_tsdn(tsd), tctx, NULL, NULL, true, true); in prof_tctx_destroy()
736 tgctx.p = prof_gctx_create(tsd_tsdn(tsd), bt); in prof_lookup_global()
747 idalloctm(tsd_tsdn(tsd), gctx.v, NULL, NULL, in prof_lookup_global()
765 malloc_mutex_lock(tsd_tsdn(tsd), gctx.p->lock); in prof_lookup_global()
767 malloc_mutex_unlock(tsd_tsdn(tsd), gctx.p->lock); in prof_lookup_global()
772 idalloctm(tsd_tsdn(tsd), tgctx.v, NULL, NULL, true, in prof_lookup_global()
800 malloc_mutex_lock(tsd_tsdn(tsd), tdata->lock); in prof_lookup()
805 malloc_mutex_unlock(tsd_tsdn(tsd), tdata->lock); in prof_lookup()
821 ret.v = iallocztm(tsd_tsdn(tsd), sizeof(prof_tctx_t), in prof_lookup()
838 malloc_mutex_lock(tsd_tsdn(tsd), tdata->lock); in prof_lookup()
840 malloc_mutex_unlock(tsd_tsdn(tsd), tdata->lock); in prof_lookup()
845 idalloctm(tsd_tsdn(tsd), ret.v, NULL, NULL, true, true); in prof_lookup()
848 malloc_mutex_lock(tsd_tsdn(tsd), gctx->lock); in prof_lookup()
852 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_lookup()
949 malloc_mutex_lock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_bt_count()
951 malloc_mutex_unlock(tsd_tsdn(tsd), &bt2gctx_mtx); in prof_bt_count()
1231 malloc_mutex_lock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_finish()
1240 (void *)tsd_tsdn(tsd)); in prof_gctx_finish()
1246 idalloctm(tsd_tsdn(tsd), to_destroy, in prof_gctx_finish()
1256 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_finish()
1259 malloc_mutex_unlock(tsd_tsdn(tsd), gctx->lock); in prof_gctx_finish()
1570 prof_dump_gctx_prep(tsd_tsdn(tsd), gctx.p, gctxs); in prof_dump_prep()
1577 prof_tdata_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1579 malloc_mutex_lock(tsd_tsdn(tsd), &tdatas_mtx); in prof_dump_prep()
1582 malloc_mutex_unlock(tsd_tsdn(tsd), &tdatas_mtx); in prof_dump_prep()
1585 prof_gctx_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1606 if (prof_dump_header(tsd_tsdn(tsd), propagate_err, in prof_dump_file()
1612 prof_gctx_dump_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_file()
1646 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_dump()
1659 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_dump()
1755 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_fdump()
1757 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_fdump()
1803 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_idump()
1806 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_idump()
1825 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_mdump()
1828 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); in prof_mdump()
1910 tdata = (prof_tdata_t *)iallocztm(tsd_tsdn(tsd), sizeof(prof_tdata_t), in prof_tdata_init_impl()
1927 idalloctm(tsd_tsdn(tsd), tdata, NULL, NULL, true, true); in prof_tdata_init_impl()
1941 malloc_mutex_lock(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_init_impl()
1943 malloc_mutex_unlock(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_init_impl()
1950 return prof_tdata_init_impl(tsd, prof_thr_uid_alloc(tsd_tsdn(tsd)), 0, in prof_tdata_init()
1951 NULL, prof_thread_active_init_get(tsd_tsdn(tsd))); in prof_tdata_init()
1976 malloc_mutex_assert_owner(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_destroy_locked()
1983 idalloctm(tsd_tsdn(tsd), tdata->thread_name, NULL, NULL, true, in prof_tdata_destroy_locked()
1987 idalloctm(tsd_tsdn(tsd), tdata, NULL, NULL, true, true); in prof_tdata_destroy_locked()
1992 malloc_mutex_lock(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_destroy()
1994 malloc_mutex_unlock(tsd_tsdn(tsd), &tdatas_mtx); in prof_tdata_destroy()
2001 malloc_mutex_lock(tsd_tsdn(tsd), tdata->lock); in prof_tdata_detach()
2003 destroy_tdata = prof_tdata_should_destroy(tsd_tsdn(tsd), tdata, in prof_tdata_detach()
2016 malloc_mutex_unlock(tsd_tsdn(tsd), tdata->lock); in prof_tdata_detach()
2027 prof_thread_name_alloc(tsd_tsdn(tsd), tdata->thread_name) : NULL; in prof_tdata_reinit()
2066 malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_reset()
2067 malloc_mutex_lock(tsd_tsdn(tsd), &tdatas_mtx); in prof_reset()
2083 malloc_mutex_unlock(tsd_tsdn(tsd), &tdatas_mtx); in prof_reset()
2084 malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_mtx); in prof_reset()
2178 s = prof_thread_name_alloc(tsd_tsdn(tsd), thread_name); in prof_thread_name_set()
2184 idalloctm(tsd_tsdn(tsd), tdata->thread_name, NULL, NULL, true, in prof_thread_name_set()
2358 gctx_locks = (malloc_mutex_t *)base_alloc(tsd_tsdn(tsd), in prof_boot2()
2372 tdata_locks = (malloc_mutex_t *)base_alloc(tsd_tsdn(tsd), in prof_boot2()