| /third_party/ulib/jemalloc/include/jemalloc/internal/ |
| A D | tsd_inlines.h | 9 tsdn_t *tsd_tsdn(tsd_t *tsd); 10 bool tsd_nominal(tsd_t *tsd); 34 assert(tsd != NULL); in tsd_fetch_impl() 40 tsd_set(tsd); in tsd_fetch_impl() 43 tsd_set(tsd); in tsd_fetch_impl() 48 return (tsd); in tsd_fetch_impl() 58 tsd_tsdn(tsd_t *tsd) in tsd_tsdn() argument 60 return ((tsdn_t *)tsd); in tsd_tsdn() 64 tsd_nominal(tsd_t *tsd) in tsd_nominal() argument 86 tsd->n = n; \ [all …]
|
| A D | tcache_inlines.h | 26 tsd_t *tsd; in tcache_flush() local 30 tsd = tsd_fetch(); in tcache_flush() 31 tcache_cleanup(tsd); in tcache_flush() 37 tsd_t *tsd; in tcache_enabled_get() local 42 tsd = tsd_fetch(); in tcache_enabled_get() 55 tsd_t *tsd; in tcache_enabled_set() local 60 tsd = tsd_fetch(); in tcache_enabled_set() 66 tcache_cleanup(tsd); in tcache_enabled_set() 180 tcache_event(tsd, tcache); in tcache_alloc_small() 235 tcache_event(tsd, tcache); in tcache_alloc_large() [all …]
|
| A D | witness_inlines.h | 35 tsd_t *tsd; in witness_assert_owner() local 42 tsd = tsdn_tsd(tsdn); in witness_assert_owner() 46 if (witness_owner(tsd, witness)) in witness_assert_owner() 54 tsd_t *tsd; in witness_assert_not_owner() local 63 tsd = tsdn_tsd(tsdn); in witness_assert_not_owner() 77 tsd_t *tsd; in witness_assert_lockless() local 86 tsd = tsdn_tsd(tsdn); in witness_assert_lockless() 97 tsd_t *tsd; in witness_lock() local 106 tsd = tsdn_tsd(tsdn); in witness_lock() 138 tsd_t *tsd; in witness_unlock() local [all …]
|
| A D | prof_inlines.h | 7 prof_tdata_t *prof_tdata_get(tsd_t *tsd, bool create); 53 prof_tdata_get(tsd_t *tsd, bool create) in prof_tdata_get() argument 59 tdata = tsd_prof_tdata_get(tsd); in prof_tdata_get() 62 if (tsd_nominal(tsd)) { in prof_tdata_get() 63 tdata = prof_tdata_init(tsd); in prof_tdata_get() 64 tsd_prof_tdata_set(tsd, tdata); in prof_tdata_get() 67 tdata = prof_tdata_reinit(tsd, tdata); in prof_tdata_get() 68 tsd_prof_tdata_set(tsd, tdata); in prof_tdata_get() 113 tdata = prof_tdata_get(tsd, true); in prof_sample_accum_update() 150 ret = prof_lookup(tsd, &bt); in prof_alloc_prep() [all …]
|
| A D | prof_externs.h | 49 prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt); 61 bool prof_mdump(tsd_t *tsd, const char *filename); 63 prof_tdata_t *prof_tdata_init(tsd_t *tsd); 64 prof_tdata_t *prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata); 65 void prof_reset(tsd_t *tsd, size_t lg_sample); 66 void prof_tdata_cleanup(tsd_t *tsd); 69 const char *prof_thread_name_get(tsd_t *tsd); 70 int prof_thread_name_set(tsd_t *tsd, const char *thread_name); 71 bool prof_thread_active_get(tsd_t *tsd); 72 bool prof_thread_active_set(tsd_t *tsd, bool active); [all …]
|
| A D | tcache_externs.h | 31 void tcache_event_hard(tsd_t *tsd, tcache_t *tcache); 34 void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, 36 void tcache_bin_flush_large(tsd_t *tsd, tcache_bin_t *tbin, szind_t binind, 40 tcache_t *tcache_get_hard(tsd_t *tsd); 42 void tcache_cleanup(tsd_t *tsd); 44 bool tcaches_create(tsd_t *tsd, unsigned *r_ind); 45 void tcaches_flush(tsd_t *tsd, unsigned ind); 46 void tcaches_destroy(tsd_t *tsd, unsigned ind);
|
| A D | jemalloc_internal.h | 484 void iarena_cleanup(tsd_t *tsd); 485 void arena_cleanup(tsd_t *tsd); 486 void arenas_tdata_cleanup(tsd_t *tsd); 835 ret = internal ? tsd_iarena_get(tsd) : tsd_arena_get(tsd); in arena_choose_impl() 837 ret = arena_choose_hard(tsd, internal); in arena_choose_impl() 843 arena_choose(tsd_t *tsd, arena_t *arena) in arena_choose() argument 849 arena_ichoose(tsd_t *tsd, arena_t *arena) in arena_ichoose() argument 876 return (arena_tdata_get_hard(tsd, ind)); in arena_tdata_get() 902 tdata = arena_tdata_get(tsd, ind, true); in decay_ticker_get() 1007 return (iallocztm(tsd_tsdn(tsd), size, ind, zero, tcache_get(tsd, true), in ialloc() [all …]
|
| A D | witness_externs.h | 34 void witnesses_cleanup(tsd_t *tsd); 35 void witness_prefork(tsd_t *tsd); 36 void witness_postfork_parent(tsd_t *tsd); 37 void witness_postfork_child(tsd_t *tsd);
|
| A D | ckh_externs.h | 6 bool ckh_new(tsd_t *tsd, ckh_t *ckh, size_t minitems, ckh_hash_t *hash, 8 void ckh_delete(tsd_t *tsd, ckh_t *ckh); 11 bool ckh_insert(tsd_t *tsd, ckh_t *ckh, const void *key, const void *data); 12 bool ckh_remove(tsd_t *tsd, ckh_t *ckh, const void *searchkey, void **key,
|
| A D | jemalloc_internal.h.in | 482 void iarena_cleanup(tsd_t *tsd); 483 void arena_cleanup(tsd_t *tsd); 484 void arenas_tdata_cleanup(tsd_t *tsd); 833 ret = internal ? tsd_iarena_get(tsd) : tsd_arena_get(tsd); 835 ret = arena_choose_hard(tsd, internal); 841 arena_choose(tsd_t *tsd, arena_t *arena) argument 847 arena_ichoose(tsd_t *tsd, arena_t *arena) argument 874 return (arena_tdata_get_hard(tsd, ind)); 900 tdata = arena_tdata_get(tsd, ind, true); 1005 return (iallocztm(tsd_tsdn(tsd), size, ind, zero, tcache_get(tsd, true), [all …]
|
| A D | ctl_externs.h | 6 int ctl_byname(tsd_t *tsd, const char *name, void *oldp, size_t *oldlenp, 11 int ctl_bymib(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp,
|
| /third_party/ulib/jemalloc/src/ |
| A D | jemalloc.c | 1309 tsd_t *tsd; in malloc_init_hard() local 1980 ifree(tsd, ptr, tcache_get(tsd, false), true); in je_realloc() 2043 ifree(tsd, ptr, tcache_get(tsd, false), false); in je_free() 2045 ifree(tsd, ptr, tcache_get(tsd, false), true); in je_free() 2298 tsd_t *tsd; in je_rallocx() local 2450 tsd_t *tsd; in je_xallocx() local 2526 tsd_t *tsd; in je_dallocx() local 2568 tsd_t *tsd; in je_sdallocx() local 2625 tsd_t *tsd; in je_mallctl() local 2658 tsd_t *tsd; in je_mallctlbymib() local [all …]
|
| A D | prof.c | 590 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), gctx), gctx, in prof_gctx_try_destroy() 690 prof_gctx_try_destroy(tsd, prof_tdata_get(tsd, false), gctx, in prof_tctx_destroy() 730 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), gctx.v), in prof_lookup_global() 810 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), ret.v), in prof_lookup() 910 tsd_t *tsd; in prof_bt_count() local 1662 tsd_t *tsd; in prof_cnt_all() local 1729 tsd_t *tsd; in prof_fdump() local 1749 tsd_t *tsd; in prof_idump() local 1801 tsd_t *tsd; in prof_gdump() local 1947 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), in prof_tdata_destroy_locked() [all …]
|
| A D | tcache.c | 99 arena = arena_choose(tsd, NULL); in tcache_bin_flush_small() 110 prof_idump(tsd_tsdn(tsd)); in tcache_bin_flush_small() 224 prof_idump(tsd_tsdn(tsd)); in tcache_bin_flush_large() 292 tcache_get_hard(tsd_t *tsd) in tcache_get_hard() argument 297 if (tsd_nominal(tsd)) in tcache_get_hard() 376 prof_idump(tsd_tsdn(tsd)); in tcache_destroy() 378 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), tcache), tcache, NULL, in tcache_destroy() 383 tcache_cleanup(tsd_t *tsd) in tcache_cleanup() argument 391 tcache_destroy(tsd, tcache); in tcache_cleanup() 392 tsd_tcache_set(tsd, NULL); in tcache_cleanup() [all …]
|
| A D | tsd.c | 69 tsd_t *tsd = (tsd_t *)arg; in tsd_cleanup() local 71 switch (tsd->state) { in tsd_cleanup() 77 n##_cleanup(tsd); in tsd_cleanup() 85 tsd->state = tsd_state_purgatory; in tsd_cleanup() 86 tsd_set(tsd); in tsd_cleanup() 102 tsd->state = tsd_state_purgatory; in tsd_cleanup() 103 tsd_set(tsd); in tsd_cleanup() 113 tsd_t *tsd; in malloc_tsd_boot0() local 118 tsd = tsd_fetch(); in malloc_tsd_boot0() 119 *tsd_arenas_tdata_bypassp_get(tsd) = true; in malloc_tsd_boot0() [all …]
|
| A D | witness.c | 95 witnesses_cleanup(tsd_t *tsd) in witnesses_cleanup() argument 97 witness_assert_lockless(tsd_tsdn(tsd)); in witnesses_cleanup() 103 witness_prefork(tsd_t *tsd) in witness_prefork() argument 105 tsd_witness_fork_set(tsd, true); in witness_prefork() 109 witness_postfork_parent(tsd_t *tsd) in witness_postfork_parent() argument 111 tsd_witness_fork_set(tsd, false); in witness_postfork_parent() 115 witness_postfork_child(tsd_t *tsd) in witness_postfork_child() argument 120 witnesses = tsd_witnessesp_get(tsd); in witness_postfork_child() 123 tsd_witness_fork_set(tsd, false); in witness_postfork_child()
|
| A D | ckh.c | 248 ckh_grow(tsd_t *tsd, ckh_t *ckh) in ckh_grow() argument 287 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), tab), in ckh_grow() 293 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), ckh->tab), in ckh_grow() 305 ckh_shrink(tsd_t *tsd, ckh_t *ckh) in ckh_shrink() argument 321 true, arena_ichoose(tsd, NULL)); in ckh_shrink() 336 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), tab), tab, NULL, in ckh_shrink() 345 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), ckh->tab), ckh->tab, in ckh_shrink() 412 ckh_delete(tsd_t *tsd, ckh_t *ckh) in ckh_delete() argument 428 idalloctm(tsd_tsdn(tsd), iealloc(tsd_tsdn(tsd), ckh->tab), ckh->tab, in ckh_delete() 475 if (ckh_grow(tsd, ckh)) { in ckh_insert() [all …]
|
| A D | ctl.c | 1226 oldval = (m(tsd)); \ 1265 ctl_refresh(tsd_tsdn(tsd)); in CTL_RO_NL_GEN() 1326 oldarena = arena_choose(tsd, NULL); in CTL_RO_CONFIG_GEN() 1518 tcaches_flush(tsd, tcache_ind); in tcache_flush_ctl() 1542 tcaches_destroy(tsd, tcache_ind); in tcache_destroy_ctl() 1556 tsdn_t *tsdn = tsd_tsdn(tsd); in arena_i_initialized_ctl() 1692 arena_reset(tsd, arena); in arena_i_reset_ctl() 1718 arena_reset(tsd, arena); in arena_i_destroy_ctl() 1724 arena_destroy(tsd, arena); in arena_i_destroy_ctl() 2060 if (prof_mdump(tsd, filename)) { in prof_dump_ctl() [all …]
|
| A D | rtree.c | 181 rtree_elm_witness_alloc(tsd_t *tsd, uintptr_t key, const rtree_elm_t *elm) in rtree_elm_witness_alloc() argument 185 rtree_elm_witness_tsd_t *witnesses = tsd_rtree_elm_witnessesp_get(tsd); in rtree_elm_witness_alloc() 207 rtree_elm_witness_find(tsd_t *tsd, const rtree_elm_t *elm) in rtree_elm_witness_find() argument 210 rtree_elm_witness_tsd_t *witnesses = tsd_rtree_elm_witnessesp_get(tsd); in rtree_elm_witness_find() 223 rtree_elm_witness_dalloc(tsd_t *tsd, witness_t *witness, const rtree_elm_t *elm) in rtree_elm_witness_dalloc() argument 226 rtree_elm_witness_tsd_t *witnesses = tsd_rtree_elm_witnessesp_get(tsd); in rtree_elm_witness_dalloc()
|
| A D | arena.c | 804 arena_reset(tsd_t *tsd, arena_t *arena) in arena_reset() argument 832 usize = isalloc(tsd_tsdn(tsd), extent, ptr); in arena_reset() 835 prof_free(tsd, extent, ptr, usize); in arena_reset() 836 large_dalloc(tsd_tsdn(tsd), extent); in arena_reset() 844 malloc_mutex_lock(tsd_tsdn(tsd), &arena->lock); in arena_reset() 850 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_reset() 856 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_reset() 862 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_reset() 870 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_reset() 915 arena_destroy(tsd_t *tsd, arena_t *arena) in arena_destroy() argument [all …]
|
| /third_party/ulib/jemalloc/test/unit/ |
| A D | ckh.c | 5 tsd_t *tsd; in TEST_BEGIN() local 8 tsd = tsd_fetch(); in TEST_BEGIN() 12 ckh_delete(tsd, &ckh); in TEST_BEGIN() 16 ckh_delete(tsd, &ckh); in TEST_BEGIN() 22 tsd_t *tsd; in TEST_BEGIN() local 33 tsd = tsd_fetch(); in TEST_BEGIN() 43 ckh_insert(tsd, &ckh, strs[i], strs[i]); in TEST_BEGIN() 104 ckh_delete(tsd, &ckh); in TEST_BEGIN() 111 tsd_t *tsd; in TEST_BEGIN() local 117 tsd = tsd_fetch(); in TEST_BEGIN() [all …]
|
| /third_party/ulib/musl/src/thread/ |
| A D | tss.c | 41 if (self->tsd[i] && atomic_load(&keys[i])) { in __thread_tsd_run_dtors() 42 void* tmp = self->tsd[i]; in __thread_tsd_run_dtors() 43 self->tsd[i] = 0; in __thread_tsd_run_dtors()
|
| A D | tss_set.c | 7 if (self->tsd[k] != x) { in tss_set() 8 self->tsd[k] = x; in tss_set()
|
| /third_party/ulib/musl/pthread/ |
| A D | pthread_setspecific.c | 6 if (self->tsd[k] != x) { in pthread_setspecific() 7 self->tsd[k] = (void*)x; in pthread_setspecific()
|
| A D | pthread_getspecific.c | 6 return self->tsd[k]; in __pthread_getspecific()
|