From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] dump available order allocations in each zone while dumping heap information Date: Sun, 05 Jan 2014 20:44:31 +0000 Message-ID: <52C9C42F.1060705@linaro.org> References: <1388947531-26583-1-git-send-email-karim.allah.ahmed@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1388947531-26583-1-git-send-email-karim.allah.ahmed@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Karim Raslan , xen-devel@lists.xen.org, Keir Fraser List-Id: xen-devel@lists.xenproject.org Hi Karim, (+ adding maintainers) Don't forget the maintainers, you can use scripts/get_maintainers.pl. On 01/05/2014 06:45 PM, Karim Raslan wrote: > Signed-off-by: Karim Raslan > --- > 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]) { if ( .. ) { You are using Linux coding style, not Xen. See CODING_STYLE in the root of the repository. > + printk("\t(In:\n"); We don't use tabulations on Xen, please use spaces (same for the next 4 lines). > + for ( k = 0; k < MAX_ORDER; k++) > + if(!page_list_empty(&heap(i, j, k))) if ( .. ) > + printk(" \t[order=%d]\n",k); > + printk(")\n"); > + } > + } > } > } > > Sincerely yours, -- Julien Grall