[v2] mempool: dump includes list of memory chunks
Checks
Commit Message
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@smartsharesystems.com>
Acked-by: Paul Szczepanek <paul.szczepanek@arm.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Konstantin Ananyev <konstantin.ananyev@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(+)
@@ -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)