5de29b
commit 4d653a59ffeae0f46f76a40230e2cfa9587b7e7e
5de29b
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
5de29b
Date:   Fri May 30 22:43:52 2014 +0530
5de29b
5de29b
    Add mmap usage in malloc_info output
5de29b
    
5de29b
    The current malloc_info xml output only has information about
5de29b
    allocations on the heap.  Display information about number of mappings
5de29b
    and total mmapped size to this to complete the picture.
5de29b
12745e
diff -pruN glibc-2.17-c758a686/malloc/malloc.c glibc-2.17-c758a686/malloc/malloc.c
12745e
--- glibc-2.17-c758a686/malloc/malloc.c	2014-06-02 07:35:22.573256155 +0530
12745e
+++ glibc-2.17-c758a686/malloc/malloc.c	2014-06-02 07:34:58.856257177 +0530
5de29b
@@ -6553,12 +6553,14 @@ malloc_info (int options, FILE *fp)
5de29b
   fprintf (fp,
5de29b
 	   "<total type=\"fast\" count=\"%zu\" size=\"%zu\"/>\n"
5de29b
 	   "<total type=\"rest\" count=\"%zu\" size=\"%zu\"/>\n"
5de29b
+	   "<total type=\"mmap\" count=\"%d\" size=\"%zu\"/>\n"
5de29b
 	   "<system type=\"current\" size=\"%zu\"/>\n"
5de29b
 	   "<system type=\"max\" size=\"%zu\"/>\n"
5de29b
 	   "<aspace type=\"total\" size=\"%zu\"/>\n"
5de29b
 	   "<aspace type=\"mprotect\" size=\"%zu\"/>\n"
5de29b
 	   "</malloc>\n",
5de29b
 	   total_nfastblocks, total_fastavail, total_nblocks, total_avail,
5de29b
+	   mp_.n_mmaps, mp_.mmapped_mem,
5de29b
 	   total_system, total_max_system,
5de29b
 	   total_aspace, total_aspace_mprotect);
5de29b