DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] mempool:Add monitor print for memory pool
@ 2022-12-31 16:07 wushaohua
  0 siblings, 0 replies; only message in thread
From: wushaohua @ 2022-12-31 16:07 UTC (permalink / raw)
  To: dev; +Cc: wushaohua

From: wushaohua <wushaohua@chinatelecom.cn>

rte_mempool_dump adds prints for monitoring available and
used memory blocks

Signed-off-by: wushaohua <wushaohua@chinatelecom.cn>
---
 lib/mempool/rte_mempool.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
index f33f455790..f6790bcc78 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -1268,7 +1268,10 @@ rte_mempool_dump(FILE *f, struct rte_mempool *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=%u",
+				rte_mempool_in_use_count(mp));
 	/* sum and dump statistics */
 #ifdef RTE_LIBRTE_MEMPOOL_STATS
 	rte_mempool_ops_get_info(mp, &info);
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-31 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-31 16:07 [PATCH] mempool:Add monitor print for memory pool wushaohua

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).