[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/5] VT-d support for PV guests
>--- a/xen/arch/x86/domain.c Mon May 19 20:32:22 2008 +0100 >+++ b/xen/arch/x86/domain.c Mon May 19 20:42:54 2008 +0100 >@@ -127,12 +127,15 @@ > void dump_pageframe_info(struct domain *d) > { > struct page_info *page; >+ int cnt[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; > > printk("Memory pages belonging to domain %u:\n", d->domain_id); > > if ( d->tot_pages >= 10 ) > { > printk(" DomPage list too long to display\n"); >+ list_for_each_entry ( page, &d->page_list, list ) >+ cnt[(page->u.inuse.type_info >> 29) & 0x7]++; > } > else > { >@@ -141,8 +144,12 @@ > printk(" DomPage %p: caf=%08x, taf=%" PRtype_info "\n", > _p(page_to_mfn(page)), > page->count_info, page->u.inuse.type_info); >+ cnt[(page->u.inuse.type_info >> 29) & 0x7]++; > } > } >+ printk(" TypeCnt " >+ "{ none %d, L1 %d, L2 %d, L3 %d, L4 %d, seg %d, rw %d }\n", >+ cnt[0], cnt[1], cnt[2], cnt[3], cnt[4], cnt[5], cnt[7]); > > list_for_each_entry ( page, &d->xenpage_list, list ) > { Even if just used for debug output, I think using hard-coded numbers here is as unacceptable as it would be anywhere else. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |