summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/statedump.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/statedump.c')
-rw-r--r--libglusterfs/src/statedump.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c
index 57447c4d9f2..b76c9a562dc 100644
--- a/libglusterfs/src/statedump.c
+++ b/libglusterfs/src/statedump.c
@@ -169,6 +169,8 @@ gf_proc_dump_xlator_mem_info (xlator_t *xl)
gf_proc_dump_write (key, "%u", xl->mem_acct.rec[i].max_size);
gf_proc_dump_build_key (key, prefix, "max_num_allocs");
gf_proc_dump_write (key, "%u", xl->mem_acct.rec[i].max_num_allocs);
+ gf_proc_dump_build_key (key, prefix, "total_allocs");
+ gf_proc_dump_write (key, "%u", xl->mem_acct.rec[i].total_allocs);
}
return;
@@ -202,6 +204,25 @@ gf_proc_dump_mem_info ()
}
+void
+gf_proc_dump_mempool_info (glusterfs_ctx_t *ctx)
+{
+ struct mem_pool *pool = NULL;
+
+ gf_proc_dump_add_section ("mempool");
+
+ list_for_each_entry (pool, &ctx->mempool_list, global_list) {
+ gf_proc_dump_write ("-----", "-----");
+ gf_proc_dump_write ("pool-name", "%s", pool->name);
+ gf_proc_dump_write ("hot-count", "%d", pool->hot_count);
+ gf_proc_dump_write ("cold-count", "%d", pool->cold_count);
+ gf_proc_dump_write ("padded_sizeof", "%lu",
+ pool->padded_sizeof_type);
+ gf_proc_dump_write ("alloc-count", "%"PRIu64, pool->alloc_count);
+ gf_proc_dump_write ("max-alloc", "%d", pool->max_alloc);
+ }
+}
+
void gf_proc_dump_latency_info (xlator_t *xl);
void
@@ -422,11 +443,13 @@ gf_proc_dump_info (int signum)
if (ret < 0)
goto out;
- if (GF_PROC_DUMP_IS_OPTION_ENABLED (mem))
- gf_proc_dump_mem_info ();
-
ctx = glusterfs_ctx_get ();
+ if (GF_PROC_DUMP_IS_OPTION_ENABLED (mem)) {
+ gf_proc_dump_mem_info ();
+ gf_proc_dump_mempool_info (ctx);
+ }
+
if (ctx) {
if (GF_PROC_DUMP_IS_OPTION_ENABLED (iobuf))
iobuf_stats_dump (ctx->iobuf_pool);