[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] dump available order allocations in each zone while dumping heap information



Signed-off-by: Karim Raslan <karim.allah.ahmed@xxxxxxxxx>
---
 xen/common/page_alloc.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 5f484a2..5419b3f 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1673,7 +1673,7 @@ void scrub_one_page(struct page_info *pg)
 static void dump_heap(unsigned char key)
 {
     s_time_t      now = NOW();
-    int           i, j;
+    int           i, j, k;
 
     printk("'%c' pressed -> dumping heap info (now-0x%X:%08X)\n", key,
            (u32)(now>>32), (u32)now);
@@ -1683,8 +1683,17 @@ static void dump_heap(unsigned char key)
         if ( !avail[i] )
             continue;
         for ( j = 0; j < NR_ZONES; j++ )
+        {
             printk("heap[node=%d][zone=%d] -> %lu pages\n",
                    i, j, avail[i][j]);
+            if(avail[i][j]) {
+               printk("\t(In:\n");
+                               for ( k = 0; k < MAX_ORDER; k++)
+                                       if(!page_list_empty(&heap(i, j, k)))
+                                               printk("  \t[order=%d]\n",k);
+                               printk(")\n");
+            }
+        }
     }
 }
 
-- 
1.7.9.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.