HPA stats: report retained instead of inactive.
This more closely maps to the PAC.
This commit is contained in:
parent
d3e5ea03c5
commit
061cabb712
28
src/stats.c
28
src/stats.c
@ -809,19 +809,17 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
|
||||
|
||||
size_t npageslabs_huge;
|
||||
size_t nactive_huge;
|
||||
size_t ninactive_huge;
|
||||
size_t ndirty_huge;
|
||||
|
||||
size_t npageslabs_nonhuge;
|
||||
size_t nactive_nonhuge;
|
||||
size_t ninactive_nonhuge;
|
||||
size_t ndirty_nonhuge;
|
||||
size_t nretained_nonhuge;
|
||||
|
||||
CTL_M2_GET("stats.arenas.0.hpa_shard.full_slabs.npageslabs_huge",
|
||||
i, &npageslabs_huge, size_t);
|
||||
CTL_M2_GET("stats.arenas.0.hpa_shard.full_slabs.nactive_huge",
|
||||
i, &nactive_huge, size_t);
|
||||
ninactive_huge = npageslabs_huge * HUGEPAGE_PAGES - nactive_huge;
|
||||
CTL_M2_GET("stats.arenas.0.hpa_shard.full_slabs.ndirty_huge",
|
||||
i, &ndirty_huge, size_t);
|
||||
|
||||
@ -829,10 +827,10 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
|
||||
i, &npageslabs_nonhuge, size_t);
|
||||
CTL_M2_GET("stats.arenas.0.hpa_shard.full_slabs.nactive_nonhuge",
|
||||
i, &nactive_nonhuge, size_t);
|
||||
ninactive_nonhuge = npageslabs_nonhuge * HUGEPAGE_PAGES
|
||||
- nactive_nonhuge;
|
||||
CTL_M2_GET("stats.arenas.0.hpa_shard.full_slabs.ndirty_nonhuge",
|
||||
i, &ndirty_nonhuge, size_t);
|
||||
nretained_nonhuge = npageslabs_nonhuge * HUGEPAGE_PAGES
|
||||
- nactive_nonhuge - ndirty_nonhuge;
|
||||
|
||||
size_t sec_bytes;
|
||||
CTL_M2_GET("stats.arenas.0.hpa_sec_bytes", i, &sec_bytes, size_t);
|
||||
@ -850,8 +848,8 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
|
||||
" In full slabs:\n"
|
||||
" npageslabs: %zu huge, %zu nonhuge\n"
|
||||
" nactive: %zu huge, %zu nonhuge \n"
|
||||
" ninactive: %zu huge, %zu nonhuge \n"
|
||||
" ndirty: %zu huge, %zu nonhuge \n",
|
||||
" ndirty: %zu huge, %zu nonhuge \n"
|
||||
" nretained: 0 huge, %zu nonhuge \n",
|
||||
nevictions, rate_per_second(nevictions, uptime),
|
||||
npurge_passes, rate_per_second(npurge_passes, uptime),
|
||||
npurges, rate_per_second(npurges, uptime),
|
||||
@ -859,8 +857,8 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
|
||||
ndehugifies, rate_per_second(ndehugifies, uptime),
|
||||
npageslabs_huge, npageslabs_nonhuge,
|
||||
nactive_huge, nactive_nonhuge,
|
||||
ninactive_huge, ninactive_nonhuge,
|
||||
ndirty_huge, ndirty_nonhuge);
|
||||
ndirty_huge, ndirty_nonhuge,
|
||||
nretained_nonhuge);
|
||||
|
||||
emitter_json_object_kv_begin(emitter, "hpa_shard");
|
||||
emitter_json_kv(emitter, "nevictions", emitter_type_uint64,
|
||||
@ -893,12 +891,11 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
|
||||
COL_HDR(row, ind, NULL, right, 4, unsigned)
|
||||
COL_HDR(row, npageslabs_huge, NULL, right, 16, size)
|
||||
COL_HDR(row, nactive_huge, NULL, right, 16, size)
|
||||
COL_HDR(row, ninactive_huge, NULL, right, 16, size)
|
||||
COL_HDR(row, ndirty_huge, NULL, right, 16, size)
|
||||
COL_HDR(row, npageslabs_nonhuge, NULL, right, 20, size)
|
||||
COL_HDR(row, nactive_nonhuge, NULL, right, 20, size)
|
||||
COL_HDR(row, ninactive_nonhuge, NULL, right, 20, size)
|
||||
COL_HDR(row, ndirty_nonhuge, NULL, right, 20, size)
|
||||
COL_HDR(row, nretained_nonhuge, NULL, right, 20, size)
|
||||
|
||||
size_t stats_arenas_mib[CTL_MAX_DEPTH];
|
||||
CTL_LEAF_PREPARE(stats_arenas_mib, 0, "stats.arenas");
|
||||
@ -917,8 +914,6 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
|
||||
&nactive_huge, size_t);
|
||||
CTL_LEAF(stats_arenas_mib, 6, "ndirty_huge",
|
||||
&ndirty_huge, size_t);
|
||||
ninactive_huge = npageslabs_huge * HUGEPAGE_PAGES
|
||||
- nactive_huge;
|
||||
|
||||
CTL_LEAF(stats_arenas_mib, 6, "npageslabs_nonhuge",
|
||||
&npageslabs_nonhuge, size_t);
|
||||
@ -926,8 +921,8 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
|
||||
&nactive_nonhuge, size_t);
|
||||
CTL_LEAF(stats_arenas_mib, 6, "ndirty_nonhuge",
|
||||
&ndirty_nonhuge, size_t);
|
||||
ninactive_nonhuge = npageslabs_nonhuge * HUGEPAGE_PAGES
|
||||
- nactive_nonhuge;
|
||||
nretained_nonhuge = npageslabs_nonhuge * HUGEPAGE_PAGES
|
||||
- nactive_nonhuge - ndirty_nonhuge;
|
||||
|
||||
bool in_gap_prev = in_gap;
|
||||
in_gap = (npageslabs_huge == 0 && npageslabs_nonhuge == 0);
|
||||
@ -940,12 +935,11 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
|
||||
col_ind.size_val = j;
|
||||
col_npageslabs_huge.size_val = npageslabs_huge;
|
||||
col_nactive_huge.size_val = nactive_huge;
|
||||
col_ninactive_huge.size_val = ninactive_huge;
|
||||
col_ndirty_huge.size_val = ndirty_huge;
|
||||
col_npageslabs_nonhuge.size_val = npageslabs_nonhuge;
|
||||
col_nactive_nonhuge.size_val = nactive_nonhuge;
|
||||
col_ninactive_nonhuge.size_val = ninactive_nonhuge;
|
||||
col_ndirty_nonhuge.size_val = ndirty_nonhuge;
|
||||
col_nretained_nonhuge.size_val = nretained_nonhuge;
|
||||
if (!in_gap) {
|
||||
emitter_table_row(emitter, &row);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user