[PATCH v2] mempool: dump includes list of memory chunks
Morten Brørup
mb at smartsharesystems.com
Tue Jun 11 08:38:22 CEST 2024
Added information about the memory chunks holding the objects in the
mempool when dumping the status of the mempool to a file.
Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Paul Szczepanek <paul.szczepanek at arm.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
v2:
* Dump one line per entry. Remove headline and index number.
(Stephen, Konstantin.)
* Changed reviewed-by to acked-by.
---
lib/mempool/rte_mempool.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
index 12390a2c81..f72cbc7217 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -1264,6 +1264,10 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
(long double)mem_len / mp->size);
}
+ STAILQ_FOREACH(memhdr, &mp->mem_list, next)
+ fprintf(f, " memory chunk at %p, addr=%p, iova=0x%" PRIx64 ", len=%zu\n",
+ memhdr, memhdr->addr, memhdr->iova, memhdr->len);
+
cache_count = rte_mempool_dump_cache(f, mp);
common_count = rte_mempool_ops_get_count(mp);
if ((cache_count + common_count) > mp->size)
--
2.17.1
More information about the dev
mailing list