/external/compiler-rt/test/asan/TestCases/Posix/ |
H A D | tsd_dtor_leak.cc | 1 // Regression test for a leak in tsd: 20 void Dtor(void *tsd) { argument 22 free(tsd);
|
/external/compiler-rt/lib/asan/ |
H A D | asan_posix.cc | 86 void AsanTSDInit(void (*destructor)(void *tsd)) { argument 97 void AsanTSDSet(void *tsd) { argument 99 pthread_setspecific(tsd_key, tsd); 102 void PlatformTSDDtor(void *tsd) { argument 103 AsanThreadContext *context = (AsanThreadContext*)tsd; 106 CHECK_EQ(0, pthread_setspecific(tsd_key, tsd)); 109 AsanThread::TSDDtor(tsd);
|
H A D | asan_win.cc | 157 void AsanTSDInit(void (*destructor)(void *tsd)) { argument 167 void AsanTSDSet(void *tsd) { argument 169 fake_tsd = tsd; 172 void PlatformTSDDtor(void *tsd) { argument 173 AsanThread::TSDDtor(tsd);
|
H A D | asan_thread.cc | 98 void AsanThread::TSDDtor(void *tsd) { argument 99 AsanThreadContext *context = (AsanThreadContext*)tsd;
|
/external/jemalloc/include/jemalloc/internal/ |
H A D | 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);
|
H A D | tsd.h | 28 * library-private tsd variable: 598 bool tsd_nominal(tsd_t *tsd); 600 t *tsd_##n##p_get(tsd_t *tsd); \ 601 t tsd_##n##_get(tsd_t *tsd); \ 602 void tsd_##n##_set(tsd_t *tsd, t n); 614 tsd_t *tsd = tsd_get(); local 616 if (unlikely(tsd->state != tsd_state_nominal)) { 617 if (tsd->state == tsd_state_uninitialized) { 618 tsd->state = tsd_state_nominal; 620 tsd_set(tsd); 632 tsd_nominal(tsd_t *tsd) argument [all...] |
H A D | tcache.h | 139 void tcache_event_hard(tsd_t *tsd, tcache_t *tcache); 140 void *tcache_alloc_small_hard(tsd_t *tsd, arena_t *arena, tcache_t *tcache, 142 void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, 144 void tcache_bin_flush_large(tsd_t *tsd, tcache_bin_t *tbin, index_t binind, 150 tcache_t *tcache_get_hard(tsd_t *tsd); 151 tcache_t *tcache_create(tsd_t *tsd, arena_t *arena); 152 void tcache_cleanup(tsd_t *tsd); 153 void tcache_enabled_cleanup(tsd_t *tsd); 155 bool tcaches_create(tsd_t *tsd, unsigned *r_ind); 156 void tcaches_flush(tsd_t *tsd, unsigne 186 tsd_t *tsd; local 197 tsd_t *tsd; local 215 tsd_t *tsd; local 230 tcache_get(tsd_t *tsd, bool create) argument 249 tcache_event(tsd_t *tsd, tcache_t *tcache) argument 278 tcache_alloc_small(tsd_t *tsd, arena_t *arena, tcache_t *tcache, size_t size, bool zero) argument [all...] |
H A D | prof.h | 282 void prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated); 285 void prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx); 288 prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt); 301 prof_tdata_t *prof_tdata_init(tsd_t *tsd); 302 prof_tdata_t *prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata); 303 void prof_reset(tsd_t *tsd, size_t lg_sample); 304 void prof_tdata_cleanup(tsd_t *tsd); 308 int prof_thread_name_set(tsd_t *tsd, const char *thread_name); 330 prof_tdata_t *prof_tdata_get(tsd_t *tsd, bool create); 331 bool prof_sample_accum_update(tsd_t *tsd, size_ 371 prof_tdata_get(tsd_t *tsd, bool create) argument 415 prof_sample_accum_update(tsd_t *tsd, size_t usize, bool update, prof_tdata_t **tdata_out) argument 445 prof_alloc_prep(tsd_t *tsd, size_t usize, bool update) argument 480 prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx, bool updated, size_t old_usize, prof_tctx_t *old_tctx) argument 510 prof_free(tsd_t *tsd, const void *ptr, size_t usize) argument [all...] |
/external/compiler-rt/lib/msan/ |
H A D | msan_linux.cc | 159 void MsanTSDInit(void (*destructor)(void *tsd)) { argument 180 void MsanTSDDtor(void *tsd) { argument 181 MsanThread *t = (MsanThread*)tsd; 184 CHECK_EQ(0, pthread_setspecific(tsd_key, tsd)); 190 MsanThread::TSDDtor(tsd);
|
H A D | msan_thread.cc | 51 void MsanThread::TSDDtor(void *tsd) { argument 52 MsanThread *t = (MsanThread*)tsd;
|
/external/jemalloc/src/ |
H A D | quarantine.c | 15 static quarantine_t *quarantine_grow(tsd_t *tsd, quarantine_t *quarantine); 16 static void quarantine_drain_one(tsd_t *tsd, quarantine_t *quarantine); 17 static void quarantine_drain(tsd_t *tsd, quarantine_t *quarantine, 23 quarantine_init(tsd_t *tsd, size_t lg_maxobjs) argument 27 assert(tsd_nominal(tsd)); 29 quarantine = (quarantine_t *)iallocztm(tsd, offsetof(quarantine_t, objs) 31 tcache_get(tsd, true), true, NULL); 43 quarantine_alloc_hook_work(tsd_t *tsd) argument 47 if (!tsd_nominal(tsd)) 50 quarantine = quarantine_init(tsd, LG_MAXOBJS_INI 62 quarantine_grow(tsd_t *tsd, quarantine_t *quarantine) argument 97 quarantine_drain_one(tsd_t *tsd, quarantine_t *quarantine) argument 109 quarantine_drain(tsd_t *tsd, quarantine_t *quarantine, size_t upper_bound) argument 117 quarantine(tsd_t *tsd, void *ptr) argument 170 quarantine_cleanup(tsd_t *tsd) argument [all...] |
H A D | huge.c | 34 huge_malloc(tsd_t *tsd, arena_t *arena, size_t size, bool zero, argument 45 return (huge_palloc(tsd, arena, usize, chunksize, zero, tcache)); 49 huge_palloc(tsd_t *tsd, arena_t *arena, size_t usize, size_t alignment, argument 59 node = ipallocztm(tsd, CACHELINE_CEILING(sizeof(extent_node_t)), 77 arena = arena_choose(tsd, arena); 82 idalloctm(tsd, node, tcache, true); 90 idalloctm(tsd, node, tcache, true); 329 huge_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize, size_t size, argument 345 ret = huge_palloc(tsd, arena, size + extra, alignment, zero, 348 ret = huge_malloc(tsd, aren 375 huge_dalloc(tsd_t *tsd, void *ptr, tcache_t *tcache) argument [all...] |
H A D | tsd.c | 73 tsd_t *tsd = (tsd_t *)arg; local 75 switch (tsd->state) { 78 n##_cleanup(tsd); 81 tsd->state = tsd_state_purgatory; 82 tsd_set(tsd); 88 * wouldn't cause re-creation of the tsd. This time, do 98 tsd->state = tsd_state_purgatory; 99 tsd_set(tsd);
|
H A D | ckh.c | 43 static bool ckh_grow(tsd_t *tsd, ckh_t *ckh); 44 static void ckh_shrink(tsd_t *tsd, ckh_t *ckh); 246 ckh_grow(tsd_t *tsd, ckh_t *ckh) argument 273 tab = (ckhc_t *)ipallocztm(tsd, usize, CACHELINE, true, NULL, 286 idalloctm(tsd, tab, tcache_get(tsd, false), true); 291 idalloctm(tsd, ckh->tab, tcache_get(tsd, false), true); 302 ckh_shrink(tsd_t *tsd, ckh_t *ckh) argument 317 tab = (ckhc_t *)ipallocztm(tsd, usiz 350 ckh_new(tsd_t *tsd, ckh_t *ckh, size_t minitems, ckh_hash_t *hash, ckh_keycomp_t *keycomp) argument 407 ckh_delete(tsd_t *tsd, ckh_t *ckh) argument 459 ckh_insert(tsd_t *tsd, ckh_t *ckh, const void *key, const void *data) argument 483 ckh_remove(tsd_t *tsd, ckh_t *ckh, const void *searchkey, void **key, void **data) argument [all...] |
H A D | tcache.c | 33 tcache_event_hard(tsd_t *tsd, tcache_t *tcache) argument 44 tcache_bin_flush_small(tsd, tcache, tbin, binind, 48 tcache_bin_flush_large(tsd, tbin, binind, tbin->ncached 74 tcache_alloc_small_hard(tsd_t *tsd, arena_t *arena, tcache_t *tcache, argument 89 tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, argument 100 arena = arena_choose(tsd, NULL); 169 tcache_bin_flush_large(tsd_t *tsd, tcache_bin_t *tbin, index_t binind, argument 180 arena = arena_choose(tsd, NULL); 297 tcache_get_hard(tsd_t *tsd) argument 302 if (tsd_nominal(tsd)) 313 tcache_create(tsd_t *tsd, arena_t *arena) argument 345 tcache_destroy(tsd_t *tsd, tcache_t *tcache) argument 386 tcache_cleanup(tsd_t *tsd) argument 400 tcache_enabled_cleanup(tsd_t *tsd) argument 434 tcaches_create(tsd_t *tsd, unsigned *r_ind) argument 468 tcaches_elm_flush(tsd_t *tsd, tcaches_t *elm) argument 478 tcaches_flush(tsd_t *tsd, unsigned ind) argument 485 tcaches_destroy(tsd_t *tsd, unsigned ind) argument [all...] |
H A D | ctl.c | 688 tsd_t *tsd; local 700 tsd = tsd_fetch(); 702 tarenas[i] = arena_get(tsd, i, false, false); 704 tarenas[i] = arena_get(tsd, i, false, true); 1194 tsd_t *tsd; \ 1199 tsd = tsd_fetch(); \ 1200 oldval = (m(tsd)); \ 1299 tsd_t *tsd; local 1303 tsd = tsd_fetch(); 1304 oldarena = arena_choose(tsd, NUL 1409 tsd_t *tsd; local 1466 tsd_t *tsd; local 1493 tsd_t *tsd; local 1520 tsd_t *tsd; local 1548 tsd_t *tsd; local 1974 tsd_t *tsd; local [all...] |
H A D | jemalloc.c | 430 arena_bind_locked(tsd_t *tsd, unsigned ind) argument 437 if (tsd_nominal(tsd)) 438 tsd_arena_set(tsd, arena); 442 arena_bind(tsd_t *tsd, unsigned ind) argument 446 arena_bind_locked(tsd, ind); 451 arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind) argument 461 tsd_arena_set(tsd, newarena); 476 arena_unbind(tsd_t *tsd, unsigned ind) argument 484 tsd_arena_set(tsd, NULL); 488 arena_get_hard(tsd_t *tsd, unsigne argument 559 arena_choose_hard(tsd_t *tsd) argument 620 thread_allocated_cleanup(tsd_t *tsd) argument 627 thread_deallocated_cleanup(tsd_t *tsd) argument 634 arena_cleanup(tsd_t *tsd) argument 644 arenas_cache_cleanup(tsd_t *tsd) argument 661 narenas_cache_cleanup(tsd_t *tsd) argument 668 arenas_cache_bypass_cleanup(tsd_t *tsd) argument 1358 imalloc_prof_sample(tsd_t *tsd, size_t usize, prof_tctx_t *tctx) argument 1376 imalloc_prof(tsd_t *tsd, size_t usize) argument 1396 imalloc_body(size_t size, tsd_t **tsd, size_t *usize) argument 1417 tsd_t *tsd; local 1442 imemalign_prof_sample(tsd_t *tsd, size_t alignment, size_t usize, prof_tctx_t *tctx) argument 1462 imemalign_prof(tsd_t *tsd, size_t alignment, size_t usize) argument 1486 tsd_t *tsd; local 1572 icalloc_prof_sample(tsd_t *tsd, size_t usize, prof_tctx_t *tctx) argument 1590 icalloc_prof(tsd_t *tsd, size_t usize) argument 1613 tsd_t *tsd; local 1672 irealloc_prof_sample(tsd_t *tsd, void *oldptr, size_t old_usize, size_t usize, prof_tctx_t *tctx) argument 1691 irealloc_prof(tsd_t *tsd, void *oldptr, size_t old_usize, size_t usize) argument 1710 ifree(tsd_t *tsd, void *ptr, tcache_t *tcache) argument 1732 isfree(tsd_t *tsd, void *ptr, size_t usize, tcache_t *tcache) argument 1817 tsd_t *tsd = tsd_fetch(); local 1890 imallocx_flags_decode_hard(tsd_t *tsd, size_t size, int flags, size_t *usize, size_t *alignment, bool *zero, tcache_t **tcache, arena_t **arena) argument 1920 imallocx_flags_decode(tsd_t *tsd, size_t size, int flags, size_t *usize, size_t *alignment, bool *zero, tcache_t **tcache, arena_t **arena) argument 1939 imallocx_flags(tsd_t *tsd, size_t usize, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena) argument 1951 imallocx_maybe_flags(tsd_t *tsd, size_t size, int flags, size_t usize, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena) argument 1961 imallocx_prof_sample(tsd_t *tsd, size_t size, int flags, size_t usize, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena) argument 1982 imallocx_prof(tsd_t *tsd, size_t size, int flags, size_t *usize) argument 2013 imallocx_no_prof(tsd_t *tsd, size_t size, int flags, size_t *usize) argument 2035 tsd_t *tsd; local 2069 irallocx_prof_sample(tsd_t *tsd, void *oldptr, size_t old_usize, size_t size, size_t alignment, size_t usize, bool zero, tcache_t *tcache, arena_t *arena, prof_tctx_t *tctx) argument 2092 irallocx_prof(tsd_t *tsd, void *oldptr, size_t old_usize, size_t size, size_t alignment, size_t *usize, bool zero, tcache_t *tcache, arena_t *arena) argument 2133 tsd_t *tsd; local 2241 ixallocx_prof(tsd_t *tsd, void *ptr, size_t old_usize, size_t size, size_t extra, size_t alignment, bool zero) argument 2276 tsd_t *tsd; local 2333 tsd_t *tsd; local 2368 tsd_t *tsd; local [all...] |
H A D | 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, 130 static char *prof_thread_name_alloc(tsd_t *tsd, const char *thread_name); 190 prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated) argument 203 tdata = prof_tdata_get(tsd, true); 212 prof_tctx_destroy(tsd, tctx); 236 prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx) argument 246 prof_tctx_destroy(tsd, tctx); 262 prof_enter(tsd_t *tsd, prof_tdata_t *tdata) argument 266 assert(tdata == prof_tdata_get(tsd, fals 277 prof_leave(tsd_t *tsd, prof_tdata_t *tdata) argument 542 prof_gctx_create(tsd_t *tsd, prof_bt_t *bt) argument 567 prof_gctx_try_destroy(tsd_t *tsd, prof_tdata_t *tdata_self, prof_gctx_t *gctx, prof_tdata_t *tdata) argument 631 prof_tctx_destroy(tsd_t *tsd, prof_tctx_t *tctx) argument 701 prof_lookup_global(tsd_t *tsd, prof_bt_t *bt, prof_tdata_t *tdata, void **p_btkey, prof_gctx_t **p_gctx, bool *p_new_gctx) argument 749 prof_lookup(tsd_t *tsd, prof_bt_t *bt) argument 903 tsd_t *tsd; local 1166 prof_gctx_finish(tsd_t *tsd, prof_gctx_tree_t *gctxs) argument 1446 prof_dump(tsd_t *tsd, bool propagate_err, const char *filename, bool leakcheck) argument 1550 tsd_t *tsd; local 1570 tsd_t *tsd; local 1599 tsd_t *tsd; local 1624 tsd_t *tsd; local 1687 prof_tdata_init_impl(tsd_t *tsd, uint64_t thr_uid, uint64_t thr_discrim, char *thread_name, bool active) argument 1734 prof_tdata_init(tsd_t *tsd) argument 1755 prof_tdata_destroy_locked(tsd_t *tsd, prof_tdata_t *tdata, bool even_if_attached) argument 1773 prof_tdata_destroy(tsd_t *tsd, prof_tdata_t *tdata, bool even_if_attached) argument 1782 prof_tdata_detach(tsd_t *tsd, prof_tdata_t *tdata) argument 1804 prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata) argument 1842 prof_reset(tsd_t *tsd, size_t lg_sample) argument 1869 prof_tdata_cleanup(tsd_t *tsd) argument 1907 tsd_t *tsd; local 1918 prof_thread_name_alloc(tsd_t *tsd, const char *thread_name) argument 1938 prof_thread_name_set(tsd_t *tsd, const char *thread_name) argument 1974 tsd_t *tsd; local 1987 tsd_t *tsd; local 2087 tsd_t *tsd; local [all...] |
H A D | arena.c | 2075 arena_palloc_large(tsd_t *tsd, arena_t *arena, size_t size, size_t alignment, argument 2087 arena = arena_choose(tsd, arena); 2149 arena_palloc(tsd_t *tsd, arena_t *arena, size_t usize, size_t alignment, argument 2157 ret = arena_malloc(tsd, arena, usize, zero, tcache); 2165 ret = arena_malloc(tsd, arena, usize, zero, tcache); 2170 ret = arena_palloc_large(tsd, arena, usize, alignment, 2173 ret = huge_malloc(tsd, arena, usize, zero, tcache); 2175 ret = huge_palloc(tsd, arena, usize, alignment, zero, 2624 arena_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize, size_t size, argument 2645 ret = ipalloct(tsd, usiz [all...] |
/external/jemalloc/test/unit/ |
H A D | ckh.c | 5 tsd_t *tsd; local 8 tsd = tsd_fetch(); 10 assert_false(ckh_new(tsd, &ckh, 2, ckh_string_hash, ckh_string_keycomp), 12 ckh_delete(tsd, &ckh); 14 assert_false(ckh_new(tsd, &ckh, 3, ckh_pointer_hash, 16 ckh_delete(tsd, &ckh); 22 tsd_t *tsd; local 33 tsd = tsd_fetch(); 35 assert_false(ckh_new(tsd, &ckh, 2, ckh_string_hash, ckh_string_keycomp), 43 ckh_insert(tsd, 111 tsd_t *tsd; local [all...] |
/external/mesa3d/src/mapi/mapi/ |
H A D | u_thread.h | 116 u_tsd_init(struct u_tsd *tsd) argument 118 if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) { 122 tsd->initMagic = INIT_MAGIC; 127 u_tsd_get(struct u_tsd *tsd) argument 129 if (tsd->initMagic != INIT_MAGIC) { 130 u_tsd_init(tsd); 132 return pthread_getspecific(tsd->key); 137 u_tsd_set(struct u_tsd *tsd, void *ptr) argument 139 if (tsd->initMagic != INIT_MAGIC) { 140 u_tsd_init(tsd); 182 u_tsd_init(struct u_tsd *tsd) argument 194 u_tsd_destroy(struct u_tsd *tsd) argument 205 u_tsd_get(struct u_tsd *tsd) argument 215 u_tsd_set(struct u_tsd *tsd, void *ptr) argument 260 u_tsd_init(struct u_tsd *tsd) argument 267 u_tsd_get(struct u_tsd *tsd) argument 275 u_tsd_set(struct u_tsd *tsd, void *ptr) argument [all...] |
/external/mesa3d/src/gallium/auxiliary/os/ |
H A D | os_thread.h | 459 pipe_tsd_init(pipe_tsd *tsd) argument 462 if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) { 469 tsd->initMagic = PIPE_TSD_INIT_MAGIC; 473 pipe_tsd_get(pipe_tsd *tsd) argument 475 if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { 476 pipe_tsd_init(tsd); 479 return pthread_getspecific(tsd->key); 490 pipe_tsd_set(pipe_tsd *tsd, void *value) argument 492 if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { 493 pipe_tsd_init(tsd); [all...] |
/external/libxml2/ |
H A D | threads.c | 671 xmlGlobalState *tsd = xmlNewGlobalState(); local 672 if (tsd == NULL) 675 pthread_setspecific(globalkey, tsd); 676 return (tsd); 698 xmlGlobalState *tsd = xmlNewGlobalState(); 700 if (tsd == NULL) 707 xmlFreeGlobalState(tsd); 710 p->memory = tsd; 715 TlsSetValue(globalkey, tsd); 729 return (tsd); [all...] |
/external/toybox/toys/pending/ |
H A D | syslogd.c | 408 struct unsocks *tsd; local 420 tsd = xzalloc(sizeof(struct unsocks)); 422 tsd->path = (toys.optflags & FLAG_p) ? TT.unix_socket : "/dev/log"; // DEFLOGSOCK 423 TT.lsocks = tsd; 428 tsd = xzalloc(sizeof(struct unsocks)); 429 tsd->path = temp; 430 tsd->next = TT.lsocks; 431 TT.lsocks = tsd; 440 for (tsd = TT.lsocks; tsd; ts [all...] |
/external/compiler-rt/lib/asan/tests/ |
H A D | asan_test.cc | 151 void TSDDestructor(void *tsd) { argument
|