| /f-stack/app/redis-5.0.5/deps/jemalloc/src/ |
| H A D | tsd.c | 130 tsd_set(tsd); in tsd_fetch_slow() 134 tsd_set(tsd); in tsd_fetch_slow() 150 tsd_set(tsd); in tsd_fetch_slow() 156 return tsd; in tsd_fetch_slow() 206 iarena_cleanup(tsd); in tsd_do_data_cleanup() 207 arena_cleanup(tsd); in tsd_do_data_cleanup() 209 tcache_cleanup(tsd); in tsd_do_data_cleanup() 236 tsd_set(tsd); in tsd_cleanup() 260 tsd_t *tsd; in malloc_tsd_boot0() local 266 tsd = tsd_fetch(); in malloc_tsd_boot0() [all …]
|
| H A D | jemalloc.c | 1501 tsd_t *tsd; in malloc_init_hard() local 1524 if (tsd == NULL) { in malloc_init_hard() 2000 assert(tsd); in imalloc() 2357 tsd_t *tsd; in je_realloc() local 2663 tsd_t *tsd; in je_rallocx() local 2830 tsd_t *tsd; in je_xallocx() local 3057 tsd_t *tsd; in je_mallctl() local 3099 tsd_t *tsd; in je_mallctlbymib() local 3196 tsd_t *tsd; in jemalloc_prefork() local 3269 tsd_t *tsd; in jemalloc_postfork_parent() local [all …]
|
| H A D | tcache.c | 129 prof_idump(tsd_tsdn(tsd)); in tcache_bin_flush_small() 262 prof_idump(tsd_tsdn(tsd)); in tcache_bin_flush_large() 344 tsd_slow_update(tsd); in tsd_tcache_enabled_data_init() 348 tsd_tcache_data_init(tsd); in tsd_tcache_enabled_data_init() 450 tcache_init(tsd, tcache, in tcache_create_explicit() 452 tcache_arena_associate(tsd_tsdn(tsd), tcache, arena_ichoose(tsd, NULL)); in tcache_create_explicit() 481 prof_idump(tsd_tsdn(tsd)); in tcache_flush_cache() 486 tcache_flush(tsd_t *tsd) { in tcache_flush() argument 488 tcache_flush_cache(tsd, tsd_tcachep_get(tsd)); in tcache_flush() 510 tcache_cleanup(tsd_t *tsd) { in tcache_cleanup() argument [all …]
|
| H A D | prof.c | 704 prof_gctx_try_destroy(tsd, prof_tdata_get(tsd, false), gctx, in prof_tctx_destroy() 940 tsd_t *tsd; in prof_bt_count() local 943 tsd = tsd_fetch(); in prof_bt_count() 1660 post_reentrancy(tsd); in prof_dump() 1677 tsd_t *tsd; in prof_cnt_all() local 1683 tsd = tsd_fetch(); in prof_cnt_all() 1742 tsd_t *tsd; in prof_fdump() local 1752 tsd = tsd_fetch(); in prof_fdump() 1779 tsd_t *tsd; in prof_idump() local 1836 tsd_t *tsd; in prof_gdump() local [all …]
|
| H A D | background_thread.c | 322 pre_reentrancy(tsd, NULL); 336 post_reentrancy(tsd); 341 post_reentrancy(tsd); 346 post_reentrancy(tsd); 393 tsdn_t *tsdn = tsd_tsdn(tsd); 411 pre_reentrancy(tsd, NULL); 414 post_reentrancy(tsd); 492 background_thread0_work(tsd); 552 background_thread_init(tsd, info); 569 pre_reentrancy(tsd, NULL); [all …]
|
| H A D | ctl.c | 999 ctl_init(tsd_t *tsd) { in ctl_init() argument 1001 tsdn_t *tsdn = tsd_tsdn(tsd); in ctl_init() 1468 oldval = (m(tsd)); \ 1505 ctl_refresh(tsd_tsdn(tsd)); in CTL_RO_NL_GEN() 1737 if (tcache_available(tsd)) { in CTL_RO_CONFIG_GEN() 1783 if (!tcache_available(tsd)) { in thread_tcache_flush_ctl() 1791 tcache_flush(tsd); in thread_tcache_flush_ctl() 2088 arena_reset(tsd, arena); in arena_i_reset_ctl() 2116 arena_reset(tsd, arena); in arena_i_destroy_ctl() 2122 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 283 true, NULL, true, arena_ichoose(tsd, NULL)); in ckh_grow() 311 ckh_shrink(tsd_t *tsd, ckh_t *ckh) { in ckh_shrink() argument 327 true, arena_ichoose(tsd, NULL)); in ckh_shrink() 342 idalloctm(tsd_tsdn(tsd), tab, NULL, NULL, true, true); in ckh_shrink() 404 NULL, true, arena_ichoose(tsd, NULL)); in ckh_new() 416 ckh_delete(tsd_t *tsd, ckh_t *ckh) { in ckh_delete() argument 477 if (ckh_grow(tsd, ckh)) { in ckh_insert() [all …]
|
| H A D | arena.c | 958 arena_reset(tsd_t *tsd, arena_t *arena) { in arena_reset() argument 983 rtree_ctx_t *rtree_ctx = tsd_rtree_ctx(tsd); in arena_reset() 990 assert(usize == isalloc(tsd_tsdn(tsd), ptr)); in arena_reset() 994 prof_free(tsd, ptr, usize, &alloc_ctx); in arena_reset() 996 large_dalloc(tsd_tsdn(tsd), extent); in arena_reset() 1005 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_reset() 1011 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_reset() 1017 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_reset() 1056 arena_destroy(tsd_t *tsd, arena_t *arena) { in arena_destroy() argument 1070 arena_destroy_retained(tsd_tsdn(tsd), arena); in arena_destroy() [all …]
|
| /f-stack/app/redis-5.0.5/deps/jemalloc/include/jemalloc/internal/ |
| H A D | tsd.h | 133 tsd_t tsd; member 137 tsd_tsdn(tsd_t *tsd) { in tsd_tsdn() argument 138 return (tsdn_t *)tsd; in tsd_tsdn() 150 return &tsdn->tsd; in tsdn_tsd() 246 tsd_fast(tsd_t *tsd) { in tsd_fast() argument 249 tsd_assert_fast(tsd); in tsd_fast() 262 assert(tsd != NULL); in tsd_fetch_impl() 267 assert(tsd_fast(tsd)); in tsd_fetch_impl() 268 tsd_assert_fast(tsd); in tsd_fetch_impl() 270 return tsd; in tsd_fetch_impl() [all …]
|
| H A D | jemalloc_internal_inlines_a.h | 64 return arena_tdata_get_hard(tsd, ind); in arena_tdata_get() 79 return arena_tdata_get_hard(tsd, ind); in arena_tdata_get() 122 tcache_available(tsd_t *tsd) { in tcache_available() argument 140 tcache_get(tsd_t *tsd) { in tcache_get() argument 141 if (!tcache_available(tsd)) { in tcache_get() 145 return tsd_tcachep_get(tsd); in tcache_get() 153 bool fast = tsd_fast(tsd); in pre_reentrancy() 155 ++*tsd_reentrancy_levelp_get(tsd); in pre_reentrancy() 158 tsd_slow_update(tsd); in pre_reentrancy() 164 post_reentrancy(tsd_t *tsd) { in post_reentrancy() argument [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 | prof_inlines_b.h | 17 prof_tdata_get(tsd_t *tsd, bool create) { in prof_tdata_get() argument 22 tdata = tsd_prof_tdata_get(tsd); in prof_tdata_get() 25 if (tsd_nominal(tsd)) { in prof_tdata_get() 26 tdata = prof_tdata_init(tsd); in prof_tdata_get() 27 tsd_prof_tdata_set(tsd, tdata); in prof_tdata_get() 30 tdata = prof_tdata_reinit(tsd, tdata); in prof_tdata_get() 31 tsd_prof_tdata_set(tsd, tdata); in prof_tdata_get() 71 tdata = prof_tdata_get(tsd, true); in prof_sample_accum_update() 90 if (tsd_reentrancy_level_get(tsd) > 0) { in prof_sample_accum_update() 115 ret = prof_lookup(tsd, &bt); in prof_alloc_prep() [all …]
|
| H 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, cache_bin_t *tbin, 36 void tcache_bin_flush_large(tsd_t *tsd, cache_bin_t *tbin, szind_t binind, 40 tcache_t *tcache_create_explicit(tsd_t *tsd); 41 void tcache_cleanup(tsd_t *tsd); 43 bool tcaches_create(tsd_t *tsd, unsigned *r_ind); 44 void tcaches_flush(tsd_t *tsd, unsigned ind); 45 void tcaches_destroy(tsd_t *tsd, unsigned ind); 51 void tcache_flush(tsd_t *tsd); 52 bool tsd_tcache_data_init(tsd_t *tsd); [all …]
|
| H A D | prof_externs.h | 51 prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt); 67 bool prof_mdump(tsd_t *tsd, const char *filename); 69 prof_tdata_t *prof_tdata_init(tsd_t *tsd); 70 prof_tdata_t *prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata); 71 void prof_reset(tsd_t *tsd, size_t lg_sample); 72 void prof_tdata_cleanup(tsd_t *tsd); 75 const char *prof_thread_name_get(tsd_t *tsd); 76 int prof_thread_name_set(tsd_t *tsd, const char *thread_name); 77 bool prof_thread_active_get(tsd_t *tsd); 78 bool prof_thread_active_set(tsd_t *tsd, bool active); [all …]
|
| H A D | jemalloc_internal_externs.h | 42 arena_tdata_t *arena_tdata_get_hard(tsd_t *tsd, unsigned ind); 43 arena_t *arena_choose_hard(tsd_t *tsd, bool internal); 44 void arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind); 45 void iarena_cleanup(tsd_t *tsd); 46 void arena_cleanup(tsd_t *tsd); 47 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() 195 iralloc(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, size_t alignment, in iralloc() argument 197 return iralloct(tsd_tsdn(tsd), ptr, oldsize, size, alignment, zero, in iralloc() 198 tcache_get(tsd), NULL); 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 | 13 bool background_thread_create(tsd_t *tsd, unsigned arena_ind); 14 bool background_threads_enable(tsd_t *tsd); 15 bool background_threads_disable(tsd_t *tsd);
|
| H A D | ctl.h | 93 int ctl_byname(tsd_t *tsd, const char *name, void *oldp, size_t *oldlenp, 95 int ctl_nametomib(tsd_t *tsd, const char *name, size_t *mibp, size_t *miblenp); 97 int ctl_bymib(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp,
|
| H A D | arena_externs.h | 45 void arena_reset(tsd_t *tsd, arena_t *arena); 46 void arena_destroy(tsd_t *tsd, arena_t *arena); 75 bool arena_retain_grow_limit_get_set(tsd_t *tsd, arena_t *arena,
|
| /f-stack/app/redis-5.0.5/deps/jemalloc/test/unit/ |
| H A D | tsd.c | 46 tsd_t *tsd = tsd_fetch(); in thd_start() local 53 tsd_test_data_set(tsd, d); in thd_start() 54 assert_x_eq(tsd_test_data_get(tsd), d, in thd_start() 61 tsd_test_callback_set(tsd, &data_cleanup); in thd_start() 89 tsd_t *tsd = tsd_fetch(); in thd_start_reincarnated() local 90 assert(tsd); in thd_start_reincarnated() 96 assert_ptr_not_null(tsd_arena_get(tsd), in thd_start_reincarnated() 98 tsd_cleanup((void *)tsd); in thd_start_reincarnated() 99 assert_ptr_null(*tsd_arenap_get_unsafe(tsd), in thd_start_reincarnated() 101 assert_u_eq(tsd->state, tsd_state_purgatory, in thd_start_reincarnated() [all …]
|
| H A D | ckh.c | 4 tsd_t *tsd; in TEST_BEGIN() local 7 tsd = tsd_fetch(); in TEST_BEGIN() 11 ckh_delete(tsd, &ckh); in TEST_BEGIN() 15 ckh_delete(tsd, &ckh); in TEST_BEGIN() 20 tsd_t *tsd; in TEST_BEGIN() local 31 tsd = tsd_fetch(); in TEST_BEGIN() 41 ckh_insert(tsd, &ckh, strs[i], strs[i]); in TEST_BEGIN() 102 ckh_delete(tsd, &ckh); in TEST_BEGIN() 108 tsd_t *tsd; in TEST_BEGIN() local 114 tsd = tsd_fetch(); in TEST_BEGIN() [all …]
|
| H A D | background_thread.c | 78 tsd_t *tsd = tsd_fetch(); in TEST_BEGIN() local 92 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx); in TEST_BEGIN() 96 malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx); in TEST_BEGIN()
|