lib/mempool: distinguish debug counters from cache and pool
PATCH 1/1 lib/mempool: distinguish debug counters from cache and pool
If cache is enabled, objects will be retrieved/put from/to cache, subsequently from/to the common pool. Now the debug stats caculate the objects retrived/put from/to cache and pool together, it is better to distinguish the data number from local cache and common pool.
Signed-off-by Joyce Kong <[email protected]>
--- lib/librte_mempool/rte_mempool.c | 12 +++++++ lib/librte_mempool/rte_mempool.h | 60 +++++++++++++++++++++++--------- 2 files changed, 55 insertions(+), 17 deletions(-)
lib/librte_mempool/rte_mempool.c +12 -0
@@ -1244,8 +1244,14 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)for (lcore_id =0 ; lcore_id <RTE_MAX_LCORE ; lcore_id++) { sum.put_bulk += mp->stats[lcore_id].put_bulk; sum.put_objs += mp->stats[lcore_id].put_objs; + sum.put_objs_cache += mp->stats[lcore_id].put_objs_cache; + sum.put_objs_pool += mp->stats[lcore_id].put_objs_pool; + sum.put_objs_flush += mp->stats[lcore_id].put_objs_flush; sum.get_success_bulk += mp->stats[lcore_id].get_success_bulk; sum.get_success_objs += mp->stats[lcore_id].get_success_objs; + sum.get_success_objs_cache += mp->stats[lcore_id].get_success_objs_cache; + sum.get_success_objs_pool += mp->stats[lcore_id].get_success_objs_pool; + sum.get_success_objs_refill += mp->stats[lcore_id].get_success_objs_refill; sum.get_fail_bulk += mp->stats[lcore_id].get_fail_bulk; sum.get_fail_objs += mp->stats[lcore_id].get_fail_objs; sum.get_success_blks += mp->stats[lcore_id].get_success_blks;
@@ -1254,8 +1260,14 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)fprintf (f," stats:\n" );fprintf (f," put_bulk=%" PRIu64"\n" , sum.put_bulk);fprintf (f," put_objs=%" PRIu64"\n" , sum.put_objs); +fprintf (f," put_objs_cache=%" PRIu64"\n" , sum.put_objs_cache); +fprintf (f," put_objs_pool=%" PRIu64"\n" , sum.put_objs_pool); +fprintf (f," put_objs_flush=%" PRIu64"\n" , sum.put_objs_flush);fprintf (f," get_success_bulk=%" PRIu64"\n" , sum.get_success_bulk);fprintf (f," get_success_objs=%" PRIu64"\n" , sum.get_success_objs); +fprintf (f," get_success_objs_cache=%" PRIu64"\n" , sum.get_success_objs_cache); +fprintf (f," get_success_objs_pool=%" PRIu64"\n" , sum.get_success_objs_pool); +fprintf (f," get_success_objs_refill=%" PRIu64"\n" , sum.get_success_objs_refill);fprintf (f," get_fail_bulk=%" PRIu64"\n" , sum.get_fail_bulk);fprintf (f," get_fail_objs=%" PRIu64"\n" , sum.get_fail_objs);if (info.contig_block_size >0 ) {
lib/librte_mempool/rte_mempool.h +43 -17
113 lines not on this page · raw message
Signature · 1 line
2.17.1