summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2023-02-15 17:28:58 -0800
committerQi Wang <interwq@gmail.com>2023-02-17 13:31:27 -0800
commitc7805f1eb5b9eadccb9711044e141ff741c09d4c (patch)
tree9b1dfc3b5a4b744e55cd43ef5e980a9ba1521673
parentb6125120ac22c2c7e7cd36df114a2b280dcc33e7 (diff)
downloadjemalloc-c7805f1eb5b9eadccb9711044e141ff741c09d4c.tar.gz
Add a header in HPA stats for the nonfull slabs.
-rw-r--r--src/stats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stats.c b/src/stats.c
index 701a6c86..43360a2d 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -910,8 +910,7 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
" npageslabs: %zu huge, %zu nonhuge\n"
" nactive: %zu huge, %zu nonhuge \n"
" ndirty: %zu huge, %zu nonhuge \n"
- " nretained: 0 huge, %zu nonhuge \n"
- "\n",
+ " nretained: 0 huge, %zu nonhuge \n",
npageslabs_huge, npageslabs_nonhuge,
nactive_huge, nactive_nonhuge,
ndirty_huge, ndirty_nonhuge,
@@ -932,6 +931,7 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
&ndirty_nonhuge);
emitter_json_object_end(emitter); /* End "empty_slabs" */
+ /* Last, nonfull slab stats. */
COL_HDR(row, size, NULL, right, 20, size)
COL_HDR(row, ind, NULL, right, 4, unsigned)
COL_HDR(row, npageslabs_huge, NULL, right, 16, size)
@@ -947,6 +947,7 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
stats_arenas_mib[2] = i;
CTL_LEAF_PREPARE(stats_arenas_mib, 3, "hpa_shard.nonfull_slabs");
+ emitter_table_printf(emitter, " In nonfull slabs:\n");
emitter_table_row(emitter, &header_row);
emitter_json_array_kv_begin(emitter, "nonfull_slabs");
bool in_gap = false;