mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-26 06:46:28 +03:00
Replace arena->tcache_ql with cache_bin_array_descriptor_ql walks
Drop the duplicate arena->tcache_ql; stats merging walks the cache_bin_array_descriptor_ql directly. Rename the protecting mutex from tcache_ql_mtx to cache_bin_array_descriptor_ql_mtx to match. Add an assertion in test_thread_migrate_arena that the dissociate-time flush zeros cache_bin->tstats.nrequests.
This commit is contained in:
parent
f9c84860e0
commit
b92420d309
9 changed files with 122 additions and 51 deletions
|
|
@ -305,16 +305,16 @@ stats_print_atexit(void) {
|
|||
for (i = 0, narenas = narenas_total_get(); i < narenas; i++) {
|
||||
arena_t *arena = arena_get(tsdn, i, false);
|
||||
if (arena != NULL) {
|
||||
tcache_slow_t *tcache_slow;
|
||||
cache_bin_array_descriptor_t *desc;
|
||||
|
||||
malloc_mutex_lock(tsdn, &arena->tcache_ql_mtx);
|
||||
ql_foreach (
|
||||
tcache_slow, &arena->tcache_ql, link) {
|
||||
tcache_stats_merge(
|
||||
tsdn, tcache_slow->tcache, arena);
|
||||
malloc_mutex_lock(tsdn, &arena->cache_bin_array_descriptor_ql_mtx);
|
||||
ql_foreach (desc,
|
||||
&arena->cache_bin_array_descriptor_ql,
|
||||
link) {
|
||||
tcache_stats_merge(tsdn, desc, arena);
|
||||
}
|
||||
malloc_mutex_unlock(
|
||||
tsdn, &arena->tcache_ql_mtx);
|
||||
tsdn, &arena->cache_bin_array_descriptor_ql_mtx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue