mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 14:41:42 +03:00
Fix incorrect stats mreging with sharded bins.
With sharded bins, we may not flush all items from the same arena in one run. Adjust the stats merging logic accordingly.
This commit is contained in:
parent
711a61f3b4
commit
99f4eefb61
1 changed files with 1 additions and 2 deletions
|
|
@ -134,8 +134,7 @@ tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, cache_bin_t *tbin,
|
|||
}
|
||||
|
||||
malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock);
|
||||
if (config_stats && bin_arena == arena) {
|
||||
assert(!merged_stats);
|
||||
if (config_stats && bin_arena == arena && !merged_stats) {
|
||||
merged_stats = true;
|
||||
bin->stats.nflushes++;
|
||||
bin->stats.nrequests += tbin->tstats.nrequests;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue