Skip to contentSkip to conversation

mempool:Add monitor dump for memory pool

PATCH New [email protected] 1 participant 2 messages Jan 1, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20221231160738

#1 lore raw

PATCH v2 1/1 mempool:Add monitor dump for memory pool

From: wushaohua <[email protected]>

rte_mempool_dump add dump for monitoring available and used memory blocks

---
 lib/mempool/rte_mempool.c | 5 +++++
 1 file changed, 5 insertions(+)
lib/mempool/rte_mempool.c +5 -0
index f33f455790..09d512a604 100644
@@ -1265,9 +1265,14 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
 
 	cache_count = rte_mempool_dump_cache(f, mp);
 	common_count = rte_mempool_ops_get_count(mp);
+
 	if ((cache_count + common_count) > mp->size)
 		common_count = mp->size - cache_count;
 	fprintf(f, "  common_pool_count=%u\n", common_count);
+	fprintf(f, "  common_pool_avail_count=%u\n",
+				rte_mempool_avail_count(mp));
+	fprintf(f, "  common_pool_used_count=%u\n",
+				rte_mempool_in_use_count(mp));
 
 	/* sum and dump statistics */
 #ifdef RTE_LIBRTE_MEMPOOL_STATS
Signature · 1 line
2.30.2
#2 lore raw

PATCH 1/2 mempool:Add monitor dump for memory pool

In reply to a message not in the archive

From: wushaohua <[email protected]>

rte_mempool_dump add dump for monitoring available and used memory blocks

---
 lib/mempool/rte_mempool.c | 5 +++++
 1 file changed, 5 insertions(+)
lib/mempool/rte_mempool.c +5 -0
index f33f455790..09d512a604 100644
@@ -1265,9 +1265,14 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
 
 	cache_count = rte_mempool_dump_cache(f, mp);
 	common_count = rte_mempool_ops_get_count(mp);
+
 	if ((cache_count + common_count) > mp->size)
 		common_count = mp->size - cache_count;
 	fprintf(f, "  common_pool_count=%u\n", common_count);
+	fprintf(f, "  common_pool_avail_count=%u\n",
+				rte_mempool_avail_count(mp));
+	fprintf(f, "  common_pool_used_count=%u\n",
+				rte_mempool_in_use_count(mp));
 
 	/* sum and dump statistics */
 #ifdef RTE_LIBRTE_MEMPOOL_STATS
Signature · 1 line
2.30.2