/freebsd/contrib/jemalloc/src/ |
H A D | tsd.c | 288 tsd_set(tsd); in tsd_fetch_slow() 293 tsd_set(tsd); in tsd_fetch_slow() 309 tsd_set(tsd); in tsd_fetch_slow() 315 return tsd; in tsd_fetch_slow() 365 iarena_cleanup(tsd); in tsd_do_data_cleanup() 366 arena_cleanup(tsd); in tsd_do_data_cleanup() 368 tcache_cleanup(tsd); in tsd_do_data_cleanup() 395 tsd_set(tsd); in tsd_cleanup() 419 tsd_t *tsd; in malloc_tsd_boot0() local 429 tsd = tsd_fetch(); in malloc_tsd_boot0() [all …]
|
H A D | tcache.c | 169 prof_idump(tsd_tsdn(tsd)); in tcache_bin_flush_small() 316 prof_idump(tsd_tsdn(tsd)); in tcache_bin_flush_large() 398 tsd_slow_update(tsd); in tsd_tcache_enabled_data_init() 402 tsd_tcache_data_init(tsd); in tsd_tcache_enabled_data_init() 504 tcache_init(tsd, tcache, in tcache_create_explicit() 506 tcache_arena_associate(tsd_tsdn(tsd), tcache, arena_ichoose(tsd, NULL)); in tcache_create_explicit() 535 prof_idump(tsd_tsdn(tsd)); in tcache_flush_cache() 540 tcache_flush(tsd_t *tsd) { in tcache_flush() argument 542 tcache_flush_cache(tsd, tsd_tcachep_get(tsd)); in tcache_flush() 568 arena_decay(tsd_tsdn(tsd), arena_get(tsd_tsdn(tsd), 0, false), in tcache_destroy() [all …]
|
H A D | jemalloc.c | 1738 tsd_t *tsd; in malloc_init_hard() local 2257 assert(tsd); in imalloc() 2740 tsd_t *tsd; in je_realloc() local 2793 if (unlikely(!tsd || !tsd_fast(tsd))) { in free_fastpath() 3203 tsd_t *tsd; in je_rallocx() local 3376 tsd_t *tsd; in je_xallocx() local 3633 tsd_t *tsd; in je_mallctl() local 3675 tsd_t *tsd; in je_mallctlbymib() local 3869 tsd_t *tsd; in jemalloc_prefork() local 3943 tsd_t *tsd; in jemalloc_postfork_parent() local [all …]
|
H A D | prof.c | 972 prof_gctx_try_destroy(tsd, prof_tdata_get(tsd, false), gctx, in prof_tctx_destroy() 1210 tsd_t *tsd; in prof_bt_count() local 1213 tsd = tsd_fetch(); in prof_bt_count() 1931 post_reentrancy(tsd); in prof_dump() 1948 tsd_t *tsd; in prof_cnt_all() local 1954 tsd = tsd_fetch(); in prof_cnt_all() 2013 tsd_t *tsd; in prof_fdump() local 2023 tsd = tsd_fetch(); in prof_fdump() 2050 tsd_t *tsd; in prof_idump() local 2107 tsd_t *tsd; in prof_gdump() local [all …]
|
H A D | background_thread.c | 320 pre_reentrancy(tsd, NULL); 334 post_reentrancy(tsd); 339 post_reentrancy(tsd); 344 post_reentrancy(tsd); 391 tsdn_t *tsdn = tsd_tsdn(tsd); 409 pre_reentrancy(tsd, NULL); 412 post_reentrancy(tsd); 490 background_thread0_work(tsd); 551 background_thread_init(tsd, info); 568 pre_reentrancy(tsd, NULL); [all …]
|
H A D | ctl.c | 1118 ctl_init(tsd_t *tsd) { in ctl_init() argument 1120 tsdn_t *tsdn = tsd_tsdn(tsd); in ctl_init() 1587 oldval = (m(tsd)); \ 1624 ctl_refresh(tsd_tsdn(tsd)); in CTL_RO_NL_GEN() 1847 if (tcache_available(tsd)) { in CTL_RO_CONFIG_GEN() 1895 if (!tcache_available(tsd)) { in thread_tcache_flush_ctl() 1903 tcache_flush(tsd); in thread_tcache_flush_ctl() 2200 arena_reset(tsd, arena); in arena_i_reset_ctl() 2228 arena_reset(tsd, arena); in arena_i_destroy_ctl() 2234 arena_destroy(tsd, arena); in arena_i_destroy_ctl() [all …]
|
H A D | ckh.c | 53 static bool ckh_grow(tsd_t *tsd, ckh_t *ckh); 54 static void ckh_shrink(tsd_t *tsd, ckh_t *ckh); 257 ckh_grow(tsd_t *tsd, ckh_t *ckh) { in ckh_grow() argument 284 true, NULL, true, arena_ichoose(tsd, NULL)); in ckh_grow() 312 ckh_shrink(tsd_t *tsd, ckh_t *ckh) { in ckh_shrink() argument 328 true, arena_ichoose(tsd, NULL)); in ckh_shrink() 343 idalloctm(tsd_tsdn(tsd), tab, NULL, NULL, true, true); in ckh_shrink() 405 NULL, true, arena_ichoose(tsd, NULL)); in ckh_new() 417 ckh_delete(tsd_t *tsd, ckh_t *ckh) { in ckh_delete() argument 478 if (ckh_grow(tsd, ckh)) { in ckh_insert() [all …]
|
/freebsd/contrib/jemalloc/include/jemalloc/internal/ |
H A D | tsd.h | 221 tsd_t tsd; member 225 tsd_tsdn(tsd_t *tsd) { in tsd_tsdn() argument 226 return (tsdn_t *)tsd; in tsd_tsdn() 238 return &tsdn->tsd; in tsdn_tsd() 336 tsd_fast(tsd_t *tsd) { in tsd_fast() argument 339 tsd_assert_fast(tsd); in tsd_fast() 352 assert(tsd != NULL); in tsd_fetch_impl() 357 assert(tsd_fast(tsd)); in tsd_fetch_impl() 358 tsd_assert_fast(tsd); in tsd_fetch_impl() 360 return tsd; in tsd_fetch_impl() [all …]
|
H A D | jemalloc_internal_inlines_a.h | 66 return arena_tdata_get_hard(tsd, ind); in arena_tdata_get() 81 return arena_tdata_get_hard(tsd, ind); in arena_tdata_get() 124 tcache_available(tsd_t *tsd) { in tcache_available() argument 142 tcache_get(tsd_t *tsd) { in tcache_get() argument 143 if (!tcache_available(tsd)) { in tcache_get() 147 return tsd_tcachep_get(tsd); in tcache_get() 155 bool fast = tsd_fast(tsd); in pre_reentrancy() 157 ++*tsd_reentrancy_levelp_get(tsd); in pre_reentrancy() 160 tsd_slow_update(tsd); in pre_reentrancy() 166 post_reentrancy(tsd_t *tsd) { in post_reentrancy() argument [all …]
|
H A D | prof_inlines_b.h | 18 prof_tdata_get(tsd_t *tsd, bool create) { in prof_tdata_get() argument 23 tdata = tsd_prof_tdata_get(tsd); in prof_tdata_get() 26 if (tsd_nominal(tsd)) { in prof_tdata_get() 27 tdata = prof_tdata_init(tsd); in prof_tdata_get() 28 tsd_prof_tdata_set(tsd, tdata); in prof_tdata_get() 31 tdata = prof_tdata_reinit(tsd, tdata); in prof_tdata_get() 32 tsd_prof_tdata_set(tsd, tdata); in prof_tdata_get() 89 if (tsd_nominal(tsd)) { in prof_sample_check() 112 bool booted = tsd_prof_tdata_get(tsd); in prof_sample_accum_update() 113 tdata = prof_tdata_get(tsd, true); in prof_sample_accum_update() [all …]
|
H A D | jemalloc_internal_inlines_b.h | 17 return arena_get(tsd_tsdn(tsd), 0, true); in arena_choose_impl() 20 ret = internal ? tsd_iarena_get(tsd) : tsd_arena_get(tsd); in arena_choose_impl() 22 ret = arena_choose_hard(tsd, internal); in arena_choose_impl() 24 if (tcache_available(tsd)) { in arena_choose_impl() 25 tcache_t *tcache = tcache_get(tsd); in arena_choose_impl() 29 arena_get(tsd_tsdn(tsd), 0, false)); in arena_choose_impl() 49 tsd_tsdn(tsd))) { in arena_choose_impl() 52 percpu_arena_update(tsd, ind); in arena_choose_impl() 53 ret = tsd_arena_get(tsd); in arena_choose_impl() 55 ret->last_thd = tsd_tsdn(tsd); in arena_choose_impl() [all …]
|
H A D | tcache_inlines.h | 12 tcache_enabled_get(tsd_t *tsd) { in tcache_enabled_get() argument 13 return tsd_tcache_enabled_get(tsd); in tcache_enabled_get() 21 tsd_tcache_data_init(tsd); in tcache_enabled_set() 23 tcache_cleanup(tsd); in tcache_enabled_set() 27 tsd_slow_update(tsd); in tcache_enabled_set() 37 tcache_event_hard(tsd, tcache); in tcache_event() 55 arena = arena_choose(tsd, arena); in tcache_alloc_small() 99 tcache_event(tsd, tcache); in tcache_alloc_small() 159 tcache_event(tsd, tcache); in tcache_alloc_large() 185 tcache_event(tsd, tcache); in tcache_dalloc_small() [all …]
|
H A D | tcache_externs.h | 29 void tcache_event_hard(tsd_t *tsd, tcache_t *tcache); 32 void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, cache_bin_t *tbin, 34 void tcache_bin_flush_large(tsd_t *tsd, cache_bin_t *tbin, szind_t binind, 38 tcache_t *tcache_create_explicit(tsd_t *tsd); 39 void tcache_cleanup(tsd_t *tsd); 41 bool tcaches_create(tsd_t *tsd, unsigned *r_ind); 42 void tcaches_flush(tsd_t *tsd, unsigned ind); 43 void tcaches_destroy(tsd_t *tsd, unsigned ind); 49 void tcache_flush(tsd_t *tsd); 50 bool tsd_tcache_data_init(tsd_t *tsd); [all …]
|
H A D | prof_externs.h | 53 prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt); 69 bool prof_mdump(tsd_t *tsd, const char *filename); 71 prof_tdata_t *prof_tdata_init(tsd_t *tsd); 72 prof_tdata_t *prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata); 73 void prof_reset(tsd_t *tsd, size_t lg_sample); 74 void prof_tdata_cleanup(tsd_t *tsd); 77 const char *prof_thread_name_get(tsd_t *tsd); 78 int prof_thread_name_set(tsd_t *tsd, const char *thread_name); 79 bool prof_thread_active_get(tsd_t *tsd); 80 bool prof_thread_active_set(tsd_t *tsd, bool active); [all …]
|
H A D | jemalloc_internal_externs.h | 45 arena_tdata_t *arena_tdata_get_hard(tsd_t *tsd, unsigned ind); 46 arena_t *arena_choose_hard(tsd_t *tsd, bool internal); 47 void arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind); 48 void iarena_cleanup(tsd_t *tsd); 49 void arena_cleanup(tsd_t *tsd); 50 void arenas_tdata_cleanup(tsd_t *tsd);
|
H A D | arena_inlines_a.h | 36 percpu_arena_update(tsd_t *tsd, unsigned cpu) { in percpu_arena_update() argument 38 arena_t *oldarena = tsd_arena_get(tsd); in percpu_arena_update() 44 arena_t *newarena = arena_get(tsd_tsdn(tsd), newind, true); in percpu_arena_update() 48 arena_migrate(tsd, oldind, newind); in percpu_arena_update() 49 tcache_t *tcache = tcache_get(tsd); in percpu_arena_update() 51 tcache_arena_reassociate(tsd_tsdn(tsd), tcache, in percpu_arena_update()
|
H A D | jemalloc_internal_inlines_c.h | 61 ialloc(tsd_t *tsd, size_t size, szind_t ind, bool zero, bool slow_path) { in ialloc() argument 62 return iallocztm(tsd_tsdn(tsd), size, ind, zero, tcache_get(tsd), false, in ialloc() 93 ipalloc(tsd_t *tsd, size_t usize, size_t alignment, bool zero) { in ipalloc() argument 94 return ipallocztm(tsd_tsdn(tsd), usize, alignment, zero, in ipalloc() 95 tcache_get(tsd), false, NULL); in ipalloc() 122 idalloc(tsd_t *tsd, void *ptr) { in idalloc() argument 123 idalloctm(tsd_tsdn(tsd), ptr, tcache_get(tsd), NULL, false, true); in idalloc() 197 iralloc(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, size_t alignment, in iralloc() argument 199 return iralloct(tsd_tsdn(tsd), ptr, oldsize, size, alignment, zero, in iralloc() 200 tcache_get(tsd), NULL, hook_args); in iralloc()
|
H A D | ckh.h | 70 bool ckh_new(tsd_t *tsd, ckh_t *ckh, size_t minitems, ckh_hash_t *hash, 72 void ckh_delete(tsd_t *tsd, ckh_t *ckh); 90 bool ckh_insert(tsd_t *tsd, ckh_t *ckh, const void *key, const void *data); 91 bool ckh_remove(tsd_t *tsd, ckh_t *ckh, const void *searchkey, void **key,
|
H A D | background_thread_externs.h | 12 bool background_thread_create(tsd_t *tsd, unsigned arena_ind); 13 bool background_threads_enable(tsd_t *tsd); 14 bool background_threads_disable(tsd_t *tsd);
|
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/ |
H A D | asan_posix.cpp | 90 void AsanTSDInit(void (*destructor)(void *tsd)) { in AsanTSDInit() argument 100 void AsanTSDSet(void *tsd) { in AsanTSDSet() argument 102 CHECK(tsd); in AsanTSDSet() 104 key.key = tsd; in AsanTSDSet() 107 void PlatformTSDDtor(void *tsd) { in PlatformTSDDtor() argument 109 CHECK_EQ(key.key, tsd); in PlatformTSDDtor() 113 AsanThread::TSDDtor(tsd); in PlatformTSDDtor() 129 void AsanTSDSet(void *tsd) { in AsanTSDSet() argument 131 pthread_setspecific(tsd_key, tsd); in AsanTSDSet() 134 void PlatformTSDDtor(void *tsd) { in PlatformTSDDtor() argument [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/memprof/ |
H A D | memprof_posix.cpp | 30 void TSDInit(void (*destructor)(void *tsd)) { in TSDInit() argument 41 void TSDSet(void *tsd) { in TSDSet() argument 43 pthread_setspecific(tsd_key, tsd); in TSDSet() 46 void PlatformTSDDtor(void *tsd) { in PlatformTSDDtor() argument 47 MemprofThreadContext *context = (MemprofThreadContext *)tsd; in PlatformTSDDtor() 50 CHECK_EQ(0, pthread_setspecific(tsd_key, tsd)); in PlatformTSDDtor() 53 MemprofThread::TSDDtor(tsd); in PlatformTSDDtor()
|
H A D | memprof_internal.h | 70 void TSDInit(void (*destructor)(void *tsd)); 72 void TSDSet(void *tsd); 73 void PlatformTSDDtor(void *tsd);
|
/freebsd/contrib/llvm-project/compiler-rt/lib/msan/ |
H A D | msan_linux.cpp | 238 void MsanTSDInit(void (*destructor)(void *tsd)) { in MsanTSDInit() argument 248 void SetCurrentThread(MsanThread *tsd) { in SetCurrentThread() argument 250 CHECK(tsd); in SetCurrentThread() 252 key.key = tsd; in SetCurrentThread() 255 void MsanTSDDtor(void *tsd) { in MsanTSDDtor() argument 257 CHECK_EQ(key.key, tsd); in MsanTSDDtor() 261 MsanThread::TSDDtor(tsd); in MsanTSDDtor() 267 void MsanTSDInit(void (*destructor)(void *tsd)) { in MsanTSDInit() argument 288 void MsanTSDDtor(void *tsd) { in MsanTSDDtor() argument 289 MsanThread *t = (MsanThread*)tsd; in MsanTSDDtor() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/dfsan/ |
H A D | dfsan_thread.cpp | 51 void DFsanThread::TSDDtor(void *tsd) { in TSDDtor() argument 52 DFsanThread *t = (DFsanThread *)tsd; in TSDDtor() 102 void DFsanTSDInit(void (*destructor)(void *tsd)) { in DFsanTSDInit() argument 121 void DFsanTSDDtor(void *tsd) { in DFsanTSDDtor() argument 122 DFsanThread *t = (DFsanThread *)tsd; in DFsanTSDDtor() 125 CHECK_EQ(0, pthread_setspecific(tsd_key, tsd)); in DFsanTSDDtor() 131 DFsanThread::TSDDtor(tsd); in DFsanTSDDtor()
|
H A D | dfsan_thread.h | 29 static void TSDDtor(void *tsd); 77 void DFsanTSDInit(void (*destructor)(void *tsd)); 78 void DFsanTSDDtor(void *tsd);
|