/external/jemalloc_new/src/ |
tsd.c | 31 * have a dependency on tsd. So we define the struct here, and only refer to it 55 tsd_slow_update(tsd_t *tsd) { 56 if (tsd_nominal(tsd)) { 57 if (malloc_slow || !tsd_tcache_enabled_get(tsd) || 58 tsd_reentrancy_level_get(tsd) > 0) { 59 tsd->state = tsd_state_nominal_slow; 61 tsd->state = tsd_state_nominal; 67 tsd_data_init(tsd_t *tsd) { 72 rtree_ctx_data_init(tsd_rtree_ctxp_get_unsafe(tsd)); 75 * A nondeterministic seed based on the address of tsd reduce 215 tsd_t *tsd = (tsd_t *)arg; local 260 tsd_t *tsd; local 274 tsd_t *tsd = tsd_fetch(); local [all...] |
jemalloc.c | 371 arena_bind(tsd_t *tsd, unsigned ind, bool internal) { 372 arena_t *arena = arena_get(tsd_tsdn(tsd), ind, false); 376 tsd_iarena_set(tsd, arena); 378 tsd_arena_set(tsd, arena); 383 arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind) { 386 oldarena = arena_get(tsd_tsdn(tsd), oldind, false); 387 newarena = arena_get(tsd_tsdn(tsd), newind, false); 390 tsd_arena_set(tsd, newarena); 394 arena_unbind(tsd_t *tsd, unsigned ind, bool internal) { 397 arena = arena_get(tsd_tsdn(tsd), ind, false) 677 tsd_t *tsd = tsdn_tsd(tsdn); local 1509 tsd_t *tsd = tsdn_tsd(tsdn); local 1517 tsd_t *tsd; local 2015 tsd_t *tsd = tsd_fetch(); local 2318 tsd_t *tsd = tsd_fetch(); local 2334 tsd_t *tsd = tsd_fetch(); local 2373 tsd_t *tsd; local 2401 tsd_t *tsd = tsd_fetch_min(); local 2679 tsd_t *tsd; local 2846 tsd_t *tsd; local 2942 tsd_t *tsd = tsd_fetch(); local 3002 tsd_t *tsd = tsd_fetch(); local 3073 tsd_t *tsd; local 3102 tsd_t *tsd = tsd_fetch(); local 3115 tsd_t *tsd; local 3212 tsd_t *tsd; local 3285 tsd_t *tsd; local 3317 tsd_t *tsd; local [all...] |
prof.c | 141 static void prof_tctx_destroy(tsd_t *tsd, prof_tctx_t *tctx); 144 static void prof_tdata_destroy(tsd_t *tsd, prof_tdata_t *tdata, 211 prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated) { 223 tdata = prof_tdata_get(tsd, true); 230 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); 232 if (prof_tctx_should_destroy(tsd_tsdn(tsd), tctx)) { 233 prof_tctx_destroy(tsd, tctx); 235 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); 257 prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx) { 258 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock) 940 tsd_t *tsd; local 1677 tsd_t *tsd; local 1742 tsd_t *tsd; local 1779 tsd_t *tsd; local 1836 tsd_t *tsd; local [all...] |
/external/jemalloc/include/jemalloc/internal/ |
quarantine.h | 32 void quarantine_alloc_hook_work(tsd_t *tsd); 33 void quarantine(tsd_t *tsd, void *ptr); 34 void quarantine_cleanup(tsd_t *tsd); 48 tsd_t *tsd; local 52 tsd = tsd_fetch(); 53 if (tsd_quarantine_get(tsd) == NULL) 54 quarantine_alloc_hook_work(tsd);
|
tcache.h | 146 void tcache_event_hard(tsd_t *tsd, tcache_t *tcache); 149 void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, 151 void tcache_bin_flush_large(tsd_t *tsd, tcache_bin_t *tbin, szind_t binind, 155 tcache_t *tcache_get_hard(tsd_t *tsd); 157 void tcache_cleanup(tsd_t *tsd); 158 void tcache_enabled_cleanup(tsd_t *tsd); 160 bool tcaches_create(tsd_t *tsd, unsigned *r_ind); 161 void tcaches_flush(tsd_t *tsd, unsigned ind); 162 void tcaches_destroy(tsd_t *tsd, unsigned ind); 173 void tcache_event(tsd_t *tsd, tcache_t *tcache) 194 tsd_t *tsd; local 205 tsd_t *tsd; local 223 tsd_t *tsd; local [all...] |
witness.h | 101 void witnesses_cleanup(tsd_t *tsd); 102 void witness_fork_cleanup(tsd_t *tsd); 103 void witness_prefork(tsd_t *tsd); 104 void witness_postfork_parent(tsd_t *tsd); 105 void witness_postfork_child(tsd_t *tsd); 112 bool witness_owner(tsd_t *tsd, const witness_t *witness); 122 witness_owner(tsd_t *tsd, const witness_t *witness) 127 witnesses = tsd_witnessesp_get(tsd); 139 tsd_t *tsd; local 146 tsd = tsdn_tsd(tsdn) 158 tsd_t *tsd; local 181 tsd_t *tsd; local 201 tsd_t *tsd; local 241 tsd_t *tsd; local [all...] |
prof.h | 283 void prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated); 286 void prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx); 289 prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt); 300 bool prof_mdump(tsd_t *tsd, const char *filename); 302 prof_tdata_t *prof_tdata_init(tsd_t *tsd); 303 prof_tdata_t *prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata); 304 void prof_reset(tsd_t *tsd, size_t lg_sample); 305 void prof_tdata_cleanup(tsd_t *tsd); 308 const char *prof_thread_name_get(tsd_t *tsd); 309 int prof_thread_name_set(tsd_t *tsd, const char *thread_name) [all...] |
/external/jemalloc_new/include/jemalloc/internal/ |
jemalloc_internal_inlines_b.h | 8 arena_choose_impl(tsd_t *tsd, arena_t *arena, bool internal) { 16 if (unlikely(tsd_reentrancy_level_get(tsd) > 0)) { 17 return arena_get(tsd_tsdn(tsd), 0, true); 20 ret = internal ? tsd_iarena_get(tsd) : tsd_arena_get(tsd); 22 ret = arena_choose_hard(tsd, internal); 24 if (tcache_available(tsd)) { 25 tcache_t *tcache = tcache_get(tsd); 29 arena_get(tsd_tsdn(tsd), 0, false)); 31 tcache_arena_reassociate(tsd_tsdn(tsd), [all...] |
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...] |
tsd.h | 32 * Loading TSD data is on the critical path of basically all malloc operations. 43 * Note: the entire tcache is embedded into TSD and spans multiple cachelines. 113 /* The actual tsd. */ 116 * The contents should be treated as totally opaque outside the tsd 133 tsd_t tsd; member in struct:tsdn_s 137 tsd_tsdn(tsd_t *tsd) { 138 return (tsdn_t *)tsd; 150 return &tsdn->tsd; 159 tsd_t *tsd_fetch_slow(tsd_t *tsd, bool internal); 160 void tsd_slow_update(tsd_t *tsd); 257 tsd_t *tsd = tsd_get(init); local 282 tsd_t *tsd = tsd_fetch_min(); local [all...] |
jemalloc_internal_inlines_a.h | 58 arena_tdata_get(tsd_t *tsd, unsigned ind, bool refresh_if_missing) { 60 arena_tdata_t *arenas_tdata = tsd_arenas_tdata_get(tsd); 64 return arena_tdata_get_hard(tsd, ind); 66 if (unlikely(ind >= tsd_narenas_tdata_get(tsd))) { 71 return (refresh_if_missing ? arena_tdata_get_hard(tsd, ind) : 79 return arena_tdata_get_hard(tsd, ind); 99 decay_ticker_get(tsd_t *tsd, unsigned ind) { 102 tdata = arena_tdata_get(tsd, ind, true); 122 tcache_available(tsd_t *tsd) { 128 if (likely(tsd_tcache_enabled_get(tsd))) { [all...] |
jemalloc_internal_externs.h | 8 /* TSD checks this to set thread local slow state accordingly. */ 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);
|
tcache_inlines.h | 12 tcache_enabled_get(tsd_t *tsd) { 13 return tsd_tcache_enabled_get(tsd); 17 tcache_enabled_set(tsd_t *tsd, bool enabled) { 18 bool was_enabled = tsd_tcache_enabled_get(tsd); 21 tsd_tcache_data_init(tsd); 23 tcache_cleanup(tsd); 26 tsd_tcache_enabled_set(tsd, enabled); 27 tsd_slow_update(tsd); 31 tcache_event(tsd_t *tsd, tcache_t *tcache) { 37 tcache_event_hard(tsd, tcache) [all...] |
prof_externs.h | 45 void prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated); 48 void prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx); 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) [all...] |
prof_inlines_b.h | 17 prof_tdata_get(tsd_t *tsd, bool create) { 22 tdata = tsd_prof_tdata_get(tsd); 25 if (tsd_nominal(tsd)) { 26 tdata = prof_tdata_init(tsd); 27 tsd_prof_tdata_set(tsd, tdata); 30 tdata = prof_tdata_reinit(tsd, tdata); 31 tsd_prof_tdata_set(tsd, tdata); 65 prof_sample_accum_update(tsd_t *tsd, size_t usize, bool update, 71 tdata = prof_tdata_get(tsd, true); 90 if (tsd_reentrancy_level_get(tsd) > 0) [all...] |
arena_inlines_a.h | 36 percpu_arena_update(tsd_t *tsd, unsigned cpu) { 38 arena_t *oldarena = tsd_arena_get(tsd); 44 arena_t *newarena = arena_get(tsd_tsdn(tsd), newind, true); 48 arena_migrate(tsd, oldind, newind); 49 tcache_t *tcache = tcache_get(tsd); 51 tcache_arena_reassociate(tsd_tsdn(tsd), tcache,
|
/external/jemalloc_new/test/unit/ |
tsd.c | 9 "Argument passed into cleanup function should match tsd " 16 * jemalloc's internal tsd reinitialization happens. 46 tsd_t *tsd = tsd_fetch(); local 47 assert_x_eq(tsd_test_data_get(tsd), MALLOC_TSD_TEST_DATA_INIT, 48 "Initial tsd get should return initialization value"); 53 tsd_test_data_set(tsd, d); 54 assert_x_eq(tsd_test_data_get(tsd), d, 55 "After tsd set, tsd get should return value that was set"); 58 assert_x_eq(tsd_test_data_get(tsd), (int)(uintptr_t)arg 89 tsd_t *tsd = tsd_fetch(); local [all...] |
/external/curl/lib/ |
asyn-thread.c | 178 struct thread_sync_data tsd; member in struct:thread_data 183 return &(((struct thread_data *)conn->async.os_specific)->tsd); 188 void destroy_thread_sync_data(struct thread_sync_data * tsd) 190 if(tsd->mtx) { 191 Curl_mutex_destroy(tsd->mtx); 192 free(tsd->mtx); 195 free(tsd->hostname); 197 if(tsd->res) 198 Curl_freeaddrinfo(tsd->res); 200 memset(tsd, 0, sizeof(*tsd)) 210 struct thread_sync_data *tsd = &td->tsd; local 252 struct thread_sync_data *tsd = conn_thread_sync_data(conn); local 275 struct thread_sync_data *tsd = (struct thread_sync_data*)arg; local 315 struct thread_sync_data *tsd = (struct thread_sync_data *)arg; local [all...] |
/external/mesa3d/src/gallium/auxiliary/os/ |
os_thread.h | 130 pipe_tsd_init(pipe_tsd *tsd) 132 if (tss_create(&tsd->key, NULL/*free*/) != 0) { 135 tsd->initMagic = PIPE_TSD_INIT_MAGIC; 139 pipe_tsd_get(pipe_tsd *tsd) 141 if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { 142 pipe_tsd_init(tsd); 144 return tss_get(tsd->key); 148 pipe_tsd_set(pipe_tsd *tsd, void *value) 150 if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { 151 pipe_tsd_init(tsd); [all...] |
/external/jemalloc/src/ |
jemalloc.c | 292 * TSD initialization can't be safely done as a side effect of 297 * a best effort attempt at initializing its TSD by hooking all 476 arena_bind(tsd_t *tsd, unsigned ind, bool internal) 480 if (!tsd_nominal(tsd)) 483 arena = arena_get(tsd_tsdn(tsd), ind, false); 487 tsd_iarena_set(tsd, arena); 489 tsd_arena_set(tsd, arena); 493 arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind) 497 oldarena = arena_get(tsd_tsdn(tsd), oldind, false); 498 newarena = arena_get(tsd_tsdn(tsd), newind, false) 1487 tsd_t *tsd; local 1586 tsd_t *tsd; local 1707 tsd_t *tsd; local 1944 tsd_t *tsd; local 1956 tsd_t *tsd; local 1999 tsd_t *tsd; local 2019 tsd_t *tsd = tsd_fetch(); local 2245 tsd_t *tsd; local 2375 tsd_t *tsd; local 2528 tsd_t *tsd; local 2610 tsd_t *tsd; local 2652 tsd_t *tsd; local 2707 tsd_t *tsd; local 2740 tsd_t *tsd; local 2825 tsd_t *tsd; local 2880 tsd_t *tsd; local 2909 tsd_t *tsd; local [all...] |
tcache.c | 37 tcache_event_hard(tsd_t *tsd, tcache_t *tcache) 48 tcache_bin_flush_small(tsd, tcache, tbin, binind, 52 tcache_bin_flush_large(tsd, tbin, binind, tbin->ncached 92 tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, 103 arena = arena_choose(tsd, NULL); 113 if (arena_prof_accum(tsd_tsdn(tsd), arena, 115 prof_idump(tsd_tsdn(tsd)); 119 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); 137 arena_dalloc_bin_junked_locked(tsd_tsdn(tsd), 150 malloc_mutex_unlock(tsd_tsdn(tsd), &bin->lock) [all...] |
tsd.c | 73 tsd_t *tsd = (tsd_t *)arg; local 75 switch (tsd->state) { 81 n##_cleanup(tsd); 84 tsd->state = tsd_state_purgatory; 85 tsd_set(tsd); 91 * wouldn't cause re-creation of the tsd. This time, do 101 tsd->state = tsd_state_purgatory; 102 tsd_set(tsd); 112 tsd_t *tsd; local 117 tsd = tsd_fetch() [all...] |
quarantine.c | 15 static quarantine_t *quarantine_grow(tsd_t *tsd, quarantine_t *quarantine); 43 quarantine_alloc_hook_work(tsd_t *tsd) 47 if (!tsd_nominal(tsd)) 50 quarantine = quarantine_init(tsd_tsdn(tsd), LG_MAXOBJS_INIT); 55 if (tsd_quarantine_get(tsd) == NULL) 56 tsd_quarantine_set(tsd, quarantine); 58 idalloctm(tsd_tsdn(tsd), quarantine, NULL, true, true); 62 quarantine_grow(tsd_t *tsd, quarantine_t *quarantine) 66 ret = quarantine_init(tsd_tsdn(tsd), quarantine->lg_maxobjs + 1); 68 quarantine_drain_one(tsd_tsdn(tsd), quarantine) [all...] |
prof.c | 125 static void prof_tctx_destroy(tsd_t *tsd, prof_tctx_t *tctx); 128 static void prof_tdata_destroy(tsd_t *tsd, prof_tdata_t *tdata, 197 prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated) 210 tdata = prof_tdata_get(tsd, true); 216 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); 218 if (prof_tctx_should_destroy(tsd_tsdn(tsd), tctx)) 219 prof_tctx_destroy(tsd, tctx); 221 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); 244 prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx) 247 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock) 917 tsd_t *tsd; local 1658 tsd_t *tsd; local 1678 tsd_t *tsd; local 1730 tsd_t *tsd; local [all...] |
witness.c | 97 witnesses_cleanup(tsd_t *tsd) 100 witness_assert_lockless(tsd_tsdn(tsd)); 106 witness_fork_cleanup(tsd_t *tsd) 113 witness_prefork(tsd_t *tsd) 116 tsd_witness_fork_set(tsd, true); 120 witness_postfork_parent(tsd_t *tsd) 123 tsd_witness_fork_set(tsd, false); 127 witness_postfork_child(tsd_t *tsd) 132 witnesses = tsd_witnessesp_get(tsd); 135 tsd_witness_fork_set(tsd, false) [all...] |