HPA stats: Allow some derived stats.
However, we put them in their own struct, to avoid the messiness that the arena has (mixing derived and non-derived stats in the arena_stats_t).
This commit is contained in:
committed by
David Goldblatt
parent
30b9e8162b
commit
746ea3de6f
@@ -6,12 +6,22 @@
|
||||
#include "jemalloc/internal/pai.h"
|
||||
#include "jemalloc/internal/psset.h"
|
||||
|
||||
typedef struct hpa_shard_nonderived_stats_s hpa_shard_nonderived_stats_t;
|
||||
struct hpa_shard_nonderived_stats_s {
|
||||
/*
|
||||
* The number of times we've purged a hugepage. Each eviction purges a
|
||||
* single hugepage.
|
||||
*
|
||||
* Guarded by the grow mutex.
|
||||
*/
|
||||
uint64_t nevictions;
|
||||
};
|
||||
|
||||
/* Completely derived; only used by CTL. */
|
||||
typedef struct hpa_shard_stats_s hpa_shard_stats_t;
|
||||
struct hpa_shard_stats_s {
|
||||
psset_stats_t psset_stats;
|
||||
/* The stat version of the nevictions counter. */
|
||||
uint64_t nevictions;
|
||||
hpa_shard_nonderived_stats_t nonderived_stats;
|
||||
};
|
||||
|
||||
typedef struct hpa_shard_s hpa_shard_t;
|
||||
@@ -73,12 +83,10 @@ struct hpa_shard_s {
|
||||
emap_t *emap;
|
||||
|
||||
/*
|
||||
* The number of times we've purged a hugepage. Each eviction purges a
|
||||
* single hugepage.
|
||||
*
|
||||
* Guarded by the grow mutex.
|
||||
* Those stats which are copied directly into the CTL-centric hpa shard
|
||||
* stats.
|
||||
*/
|
||||
uint64_t nevictions;
|
||||
hpa_shard_nonderived_stats_t stats;
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user