PA: Move in basic stats merging.
This commit is contained in:
parent
f29f6090f5
commit
506d907e40
@ -229,4 +229,7 @@ void pa_shard_prefork4(tsdn_t *tsdn, pa_shard_t *shard);
|
|||||||
void pa_shard_postfork_parent(tsdn_t *tsdn, pa_shard_t *shard);
|
void pa_shard_postfork_parent(tsdn_t *tsdn, pa_shard_t *shard);
|
||||||
void pa_shard_postfork_child(tsdn_t *tsdn, pa_shard_t *shard);
|
void pa_shard_postfork_child(tsdn_t *tsdn, pa_shard_t *shard);
|
||||||
|
|
||||||
|
void pa_shard_basic_stats_merge(pa_shard_t *shard, size_t *nactive,
|
||||||
|
size_t *ndirty, size_t *nmuzzy);
|
||||||
|
|
||||||
#endif /* JEMALLOC_INTERNAL_PA_H */
|
#endif /* JEMALLOC_INTERNAL_PA_H */
|
||||||
|
@ -71,9 +71,7 @@ arena_basic_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads,
|
|||||||
*dss = dss_prec_names[arena_dss_prec_get(arena)];
|
*dss = dss_prec_names[arena_dss_prec_get(arena)];
|
||||||
*dirty_decay_ms = arena_dirty_decay_ms_get(arena);
|
*dirty_decay_ms = arena_dirty_decay_ms_get(arena);
|
||||||
*muzzy_decay_ms = arena_muzzy_decay_ms_get(arena);
|
*muzzy_decay_ms = arena_muzzy_decay_ms_get(arena);
|
||||||
*nactive += atomic_load_zu(&arena->pa_shard.nactive, ATOMIC_RELAXED);
|
pa_shard_basic_stats_merge(&arena->pa_shard, nactive, ndirty, nmuzzy);
|
||||||
*ndirty += ecache_npages_get(&arena->pa_shard.ecache_dirty);
|
|
||||||
*nmuzzy += ecache_npages_get(&arena->pa_shard.ecache_muzzy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -53,3 +53,11 @@ pa_shard_postfork_child(tsdn_t *tsdn, pa_shard_t *shard) {
|
|||||||
malloc_mutex_postfork_child(tsdn, &shard->decay_dirty.mtx);
|
malloc_mutex_postfork_child(tsdn, &shard->decay_dirty.mtx);
|
||||||
malloc_mutex_postfork_child(tsdn, &shard->decay_muzzy.mtx);
|
malloc_mutex_postfork_child(tsdn, &shard->decay_muzzy.mtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pa_shard_basic_stats_merge(pa_shard_t *shard, size_t *nactive, size_t *ndirty,
|
||||||
|
size_t *nmuzzy) {
|
||||||
|
*nactive += atomic_load_zu(&shard->nactive, ATOMIC_RELAXED);
|
||||||
|
*ndirty += ecache_npages_get(&shard->ecache_dirty);
|
||||||
|
*nmuzzy += ecache_npages_get(&shard->ecache_muzzy);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user