Lines Matching refs:tsdn
124 static bool prof_tctx_should_destroy(tsdn_t *tsdn, prof_tctx_t *tctx);
126 static bool prof_tdata_should_destroy(tsdn_t *tsdn, prof_tdata_t *tdata,
130 static char *prof_thread_name_alloc(tsdn_t *tsdn, const char *thread_name);
226 prof_malloc_sample_object(tsdn_t *tsdn, extent_t *extent, const void *ptr, in prof_malloc_sample_object() argument
229 prof_tctx_set(tsdn, extent, ptr, usize, tctx); in prof_malloc_sample_object()
231 malloc_mutex_lock(tsdn, tctx->tdata->lock); in prof_malloc_sample_object()
239 malloc_mutex_unlock(tsdn, tctx->tdata->lock); in prof_malloc_sample_object()
542 prof_gctx_create(tsdn_t *tsdn, prof_bt_t *bt) in prof_gctx_create() argument
548 prof_gctx_t *gctx = (prof_gctx_t *)iallocztm(tsdn, size, in prof_gctx_create()
604 prof_tctx_should_destroy(tsdn_t *tsdn, prof_tctx_t *tctx) in prof_tctx_should_destroy() argument
606 malloc_mutex_assert_owner(tsdn, tctx->tdata->lock); in prof_tctx_should_destroy()
893 tsdn_t *tsdn; in prof_tdata_count() local
895 tsdn = tsdn_fetch(); in prof_tdata_count()
896 malloc_mutex_lock(tsdn, &tdatas_mtx); in prof_tdata_count()
899 malloc_mutex_unlock(tsdn, &tdatas_mtx); in prof_tdata_count()
1034 prof_tctx_merge_tdata(tsdn_t *tsdn, prof_tctx_t *tctx, prof_tdata_t *tdata) in prof_tctx_merge_tdata() argument
1036 malloc_mutex_assert_owner(tsdn, tctx->tdata->lock); in prof_tctx_merge_tdata()
1038 malloc_mutex_lock(tsdn, tctx->gctx->lock); in prof_tctx_merge_tdata()
1042 malloc_mutex_unlock(tsdn, tctx->gctx->lock); in prof_tctx_merge_tdata()
1046 malloc_mutex_unlock(tsdn, tctx->gctx->lock); in prof_tctx_merge_tdata()
1066 prof_tctx_merge_gctx(tsdn_t *tsdn, prof_tctx_t *tctx, prof_gctx_t *gctx) in prof_tctx_merge_gctx() argument
1068 malloc_mutex_assert_owner(tsdn, gctx->lock); in prof_tctx_merge_gctx()
1081 tsdn_t *tsdn = (tsdn_t *)arg; in prof_tctx_merge_iter() local
1083 malloc_mutex_assert_owner(tsdn, tctx->gctx->lock); in prof_tctx_merge_iter()
1091 prof_tctx_merge_gctx(tsdn, tctx, tctx->gctx); in prof_tctx_merge_iter()
1101 tsdn_t *tsdn; member
1111 malloc_mutex_assert_owner(arg->tsdn, tctx->gctx->lock); in prof_tctx_dump_iter()
1136 tsdn_t *tsdn = (tsdn_t *)arg; in prof_tctx_finish_iter() local
1139 malloc_mutex_assert_owner(tsdn, tctx->gctx->lock); in prof_tctx_finish_iter()
1161 prof_dump_gctx_prep(tsdn_t *tsdn, prof_gctx_t *gctx, prof_gctx_tree_t *gctxs) in prof_dump_gctx_prep() argument
1165 malloc_mutex_lock(tsdn, gctx->lock); in prof_dump_gctx_prep()
1177 malloc_mutex_unlock(tsdn, gctx->lock); in prof_dump_gctx_prep()
1181 tsdn_t *tsdn; member
1191 malloc_mutex_lock(arg->tsdn, gctx->lock); in prof_gctx_merge_iter()
1193 (void *)arg->tsdn); in prof_gctx_merge_iter()
1196 malloc_mutex_unlock(arg->tsdn, gctx->lock); in prof_gctx_merge_iter()
1248 tsdn_t *tsdn; member
1259 malloc_mutex_lock(arg->tsdn, tdata->lock); in prof_tdata_merge_iter()
1271 prof_tctx_merge_tdata(arg->tsdn, tctx.p, tdata); in prof_tdata_merge_iter()
1281 malloc_mutex_unlock(arg->tsdn, tdata->lock); in prof_tdata_merge_iter()
1310 prof_dump_header(tsdn_t *tsdn, bool propagate_err, const prof_cnt_t *cnt_all) in prof_dump_header() argument
1321 malloc_mutex_lock(tsdn, &tdatas_mtx); in prof_dump_header()
1324 malloc_mutex_unlock(tsdn, &tdatas_mtx); in prof_dump_header()
1334 prof_dump_gctx(tsdn_t *tsdn, bool propagate_err, prof_gctx_t *gctx, in prof_dump_gctx() argument
1342 malloc_mutex_assert_owner(tsdn, gctx->lock); in prof_dump_gctx()
1376 prof_tctx_dump_iter_arg.tsdn = tsdn; in prof_dump_gctx()
1508 tsdn_t *tsdn; member
1519 malloc_mutex_lock(arg->tsdn, gctx->lock); in prof_gctx_dump_iter()
1521 if (prof_dump_gctx(arg->tsdn, arg->propagate_err, gctx, &gctx->bt, in prof_gctx_dump_iter()
1529 malloc_mutex_unlock(arg->tsdn, gctx->lock); in prof_gctx_dump_iter()
1560 prof_tdata_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1568 prof_gctx_merge_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_prep()
1596 prof_gctx_dump_iter_arg->tsdn = tsd_tsdn(tsd); in prof_dump_file()
1747 prof_idump(tsdn_t *tsdn) in prof_idump() argument
1754 if (!prof_booted || tsdn_null(tsdn)) in prof_idump()
1756 tsd = tsdn_tsd(tsdn); in prof_idump()
1799 prof_gdump(tsdn_t *tsdn) in prof_gdump() argument
1806 if (!prof_booted || tsdn_null(tsdn)) in prof_gdump()
1808 tsd = tsdn_tsd(tsdn); in prof_gdump()
1819 malloc_mutex_lock(tsdn, &prof_dump_seq_mtx); in prof_gdump()
1822 malloc_mutex_unlock(tsdn, &prof_dump_seq_mtx); in prof_gdump()
1851 prof_thr_uid_alloc(tsdn_t *tsdn) in prof_thr_uid_alloc() argument
1855 malloc_mutex_lock(tsdn, &next_thr_uid_mtx); in prof_thr_uid_alloc()
1858 malloc_mutex_unlock(tsdn, &next_thr_uid_mtx); in prof_thr_uid_alloc()
1928 prof_tdata_should_destroy(tsdn_t *tsdn, prof_tdata_t *tdata, in prof_tdata_should_destroy() argument
1931 malloc_mutex_assert_owner(tsdn, tdata->lock); in prof_tdata_should_destroy()
2001 prof_tdata_expire(tsdn_t *tsdn, prof_tdata_t *tdata) in prof_tdata_expire() argument
2005 malloc_mutex_lock(tsdn, tdata->lock); in prof_tdata_expire()
2009 prof_tdata_should_destroy(tsdn, tdata, false); in prof_tdata_expire()
2012 malloc_mutex_unlock(tsdn, tdata->lock); in prof_tdata_expire()
2020 tsdn_t *tsdn = (tsdn_t *)arg; in prof_tdata_reset_iter() local
2022 return (prof_tdata_expire(tsdn, tdata) ? tdata : NULL); in prof_tdata_reset_iter()
2066 prof_active_get(tsdn_t *tsdn) in prof_active_get() argument
2070 malloc_mutex_lock(tsdn, &prof_active_mtx); in prof_active_get()
2072 malloc_mutex_unlock(tsdn, &prof_active_mtx); in prof_active_get()
2077 prof_active_set(tsdn_t *tsdn, bool active) in prof_active_set() argument
2081 malloc_mutex_lock(tsdn, &prof_active_mtx); in prof_active_set()
2084 malloc_mutex_unlock(tsdn, &prof_active_mtx); in prof_active_set()
2100 prof_thread_name_alloc(tsdn_t *tsdn, const char *thread_name) in prof_thread_name_alloc() argument
2112 ret = iallocztm(tsdn, size, size2index(size), false, NULL, true, in prof_thread_name_alloc()
2178 prof_thread_active_init_get(tsdn_t *tsdn) in prof_thread_active_init_get() argument
2182 malloc_mutex_lock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_get()
2184 malloc_mutex_unlock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_get()
2189 prof_thread_active_init_set(tsdn_t *tsdn, bool active_init) in prof_thread_active_init_set() argument
2193 malloc_mutex_lock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_set()
2196 malloc_mutex_unlock(tsdn, &prof_thread_active_init_mtx); in prof_thread_active_init_set()
2201 prof_gdump_get(tsdn_t *tsdn) in prof_gdump_get() argument
2205 malloc_mutex_lock(tsdn, &prof_gdump_mtx); in prof_gdump_get()
2207 malloc_mutex_unlock(tsdn, &prof_gdump_mtx); in prof_gdump_get()
2212 prof_gdump_set(tsdn_t *tsdn, bool gdump) in prof_gdump_set() argument
2216 malloc_mutex_lock(tsdn, &prof_gdump_mtx); in prof_gdump_set()
2219 malloc_mutex_unlock(tsdn, &prof_gdump_mtx); in prof_gdump_set()
2351 prof_prefork0(tsdn_t *tsdn) in prof_prefork0() argument
2356 malloc_mutex_prefork(tsdn, &prof_dump_mtx); in prof_prefork0()
2357 malloc_mutex_prefork(tsdn, &bt2gctx_mtx); in prof_prefork0()
2358 malloc_mutex_prefork(tsdn, &tdatas_mtx); in prof_prefork0()
2360 malloc_mutex_prefork(tsdn, &tdata_locks[i]); in prof_prefork0()
2362 malloc_mutex_prefork(tsdn, &gctx_locks[i]); in prof_prefork0()
2367 prof_prefork1(tsdn_t *tsdn) in prof_prefork1() argument
2370 malloc_mutex_prefork(tsdn, &prof_active_mtx); in prof_prefork1()
2371 malloc_mutex_prefork(tsdn, &prof_dump_seq_mtx); in prof_prefork1()
2372 malloc_mutex_prefork(tsdn, &prof_gdump_mtx); in prof_prefork1()
2373 malloc_mutex_prefork(tsdn, &next_thr_uid_mtx); in prof_prefork1()
2374 malloc_mutex_prefork(tsdn, &prof_thread_active_init_mtx); in prof_prefork1()
2379 prof_postfork_parent(tsdn_t *tsdn) in prof_postfork_parent() argument
2384 malloc_mutex_postfork_parent(tsdn, in prof_postfork_parent()
2386 malloc_mutex_postfork_parent(tsdn, &next_thr_uid_mtx); in prof_postfork_parent()
2387 malloc_mutex_postfork_parent(tsdn, &prof_gdump_mtx); in prof_postfork_parent()
2388 malloc_mutex_postfork_parent(tsdn, &prof_dump_seq_mtx); in prof_postfork_parent()
2389 malloc_mutex_postfork_parent(tsdn, &prof_active_mtx); in prof_postfork_parent()
2391 malloc_mutex_postfork_parent(tsdn, &gctx_locks[i]); in prof_postfork_parent()
2393 malloc_mutex_postfork_parent(tsdn, &tdata_locks[i]); in prof_postfork_parent()
2394 malloc_mutex_postfork_parent(tsdn, &tdatas_mtx); in prof_postfork_parent()
2395 malloc_mutex_postfork_parent(tsdn, &bt2gctx_mtx); in prof_postfork_parent()
2396 malloc_mutex_postfork_parent(tsdn, &prof_dump_mtx); in prof_postfork_parent()
2401 prof_postfork_child(tsdn_t *tsdn) in prof_postfork_child() argument
2406 malloc_mutex_postfork_child(tsdn, &prof_thread_active_init_mtx); in prof_postfork_child()
2407 malloc_mutex_postfork_child(tsdn, &next_thr_uid_mtx); in prof_postfork_child()
2408 malloc_mutex_postfork_child(tsdn, &prof_gdump_mtx); in prof_postfork_child()
2409 malloc_mutex_postfork_child(tsdn, &prof_dump_seq_mtx); in prof_postfork_child()
2410 malloc_mutex_postfork_child(tsdn, &prof_active_mtx); in prof_postfork_child()
2412 malloc_mutex_postfork_child(tsdn, &gctx_locks[i]); in prof_postfork_child()
2414 malloc_mutex_postfork_child(tsdn, &tdata_locks[i]); in prof_postfork_child()
2415 malloc_mutex_postfork_child(tsdn, &tdatas_mtx); in prof_postfork_child()
2416 malloc_mutex_postfork_child(tsdn, &bt2gctx_mtx); in prof_postfork_child()
2417 malloc_mutex_postfork_child(tsdn, &prof_dump_mtx); in prof_postfork_child()