Arena stats: Give it its own "mapped".

This distinguishes it from the PA mapped stat, which is now named "pa_mapped" to
avoid confusion. The (derived) arena stat includes base memory, and the PA stat
is no longer partially derived.
This commit is contained in:
David Goldblatt
2020-03-12 09:36:25 -07:00
committed by David Goldblatt
parent 506d907e40
commit 81c6027592
6 changed files with 17 additions and 21 deletions

View File

@@ -53,6 +53,7 @@ struct arena_stats_s {
size_t base; /* Derived. */
size_t resident; /* Derived. */
size_t metadata_thp; /* Derived. */
size_t mapped; /* Derived. */
atomic_zu_t internal;

View File

@@ -70,12 +70,13 @@ struct pa_shard_stats_s {
size_t retained; /* Derived. */
/*
* Number of bytes currently mapped, excluding retained memory.
* Number of bytes currently mapped, excluding retained memory (and any
* base-allocated memory, which is tracked by the arena stats).
*
* Partially derived -- we maintain our own counter, but add in the
* base's own counter at merge.
* We name this "pa_mapped" to avoid confusion with the arena_stats
* "mapped".
*/
atomic_zu_t mapped;
atomic_zu_t pa_mapped;
/* Number of edata_t structs allocated by base, but not being used. */
size_t edata_avail; /* Derived. */