[v2,1/2] app/proc-info: add memory heap dump

Message ID 20240730110313.2555473-2-g.singh@nxp.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series proc-info memory dump enhancement |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Gagandeep Singh July 30, 2024, 11:03 a.m. UTC
This patch add the malloc heap dump support in proc-info
memory dump option.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/proc-info/main.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index b672aaefbe..9e26b5cf3b 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -20,6 +20,7 @@ 
 #include <rte_debug.h>
 #include <rte_ethdev.h>
 #include <rte_memory.h>
+#include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_launch.h>
 #include <rte_tailq.h>
@@ -637,6 +638,10 @@  meminfo_display(void)
 	rte_memzone_dump(stdout);
 	printf("---------- END_MEMORY_ZONES -----------\n");
 
+	printf("---------- MALLOC_HEAP_DUMP -----------\n");
+	rte_malloc_dump_heaps(stdout);
+	printf("-------- END_MALLOC_HEAP_DUMP ---------\n");
+
 	printf("------------- TAIL_QUEUES -------------\n");
 	rte_dump_tailq(stdout);
 	printf("---------- END_TAIL_QUEUES ------------\n");