mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-15 09:26:21 +03:00
Extract bin->stats.nrequests mutation into bin_stats_nrequests_add
This commit is contained in:
parent
8edd101286
commit
e286fba00a
3 changed files with 46 additions and 3 deletions
|
|
@ -1287,9 +1287,8 @@ tcache_stats_merge(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena) {
|
|||
}
|
||||
if (i < SC_NBINS) {
|
||||
bin_t *bin = bin_choose(tsdn, arena, i, NULL);
|
||||
malloc_mutex_lock(tsdn, &bin->lock);
|
||||
bin->stats.nrequests += cache_bin->tstats.nrequests;
|
||||
malloc_mutex_unlock(tsdn, &bin->lock);
|
||||
bin_stats_nrequests_add(tsdn, bin,
|
||||
cache_bin->tstats.nrequests);
|
||||
} else {
|
||||
arena_stats_large_flush_nrequests_add(tsdn,
|
||||
&arena->stats, i, cache_bin->tstats.nrequests);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue