[dpdk-dev] [PATCH v1 0/2] malloc: support malloc and free tracking log
Xueming Li
xuemingl at mellanox.com
Wed Apr 8 06:04:52 CEST 2020
DPDK uses second level memory allocation management, this makes
regular memory profiler tool not applicant. This patch trys to
provide a lightweight malloc and free logging, then show leaked
memory entries based on logs.
This tool only target to malloc and free tracking, for memzone
used by ring and mempool, "dump_memzone" in testpmd list them.
There will be another example that enable and dump tracking as
secondary process.
This tool came from Mellanox internal Hackathon, thanks Shahaf Shuler
<shahafs at mellanox.com> who provided the idea.
V0: initial version
V1: log rte_realloc function
rename log size to req_size, real_size to size(total)
log padding and include padding in total size
rename log "free" field to "type", alloc_free to "paired"
rename malloc_log_index to malloc_log_count
split testpmd part into separate patch
add rte_malloc_log_stop() function
add log entry number check
change log dump detail level from (-1,0,1) to (0,1,2)
Xueming Li (2):
malloc: support malloc and free tracking log
app/testpmd: support malloc and free tracking log
app/test-pmd/cmdline.c | 60 ++++++-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 15 ++
lib/librte_eal/common/eal_memcfg.h | 26 +++
lib/librte_eal/common/malloc_elem.h | 6 +-
lib/librte_eal/common/rte_malloc.c | 259 +++++++++++++++++++++++++++-
lib/librte_eal/include/rte_malloc.h | 39 ++++-
lib/librte_eal/rte_eal_version.map | 3 +
7 files changed, 399 insertions(+), 9 deletions(-)
--
1.8.3.1
More information about the dev
mailing list