From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: xentrace: broken by c/s 23050:4ebba54b666f Date: Mon, 21 Mar 2011 22:23:20 +0100 Message-ID: <20110321212320.GA15820@aepfle.de> References: <4D87841B.1000102@amd.com> <20110321173859.GA21766@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20110321173859.GA21766@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Mar 21, Olaf Hering wrote: > On Mon, Mar 21, Christoph Egger wrote: > > > > > Hi, > > > > C/s 23050:4ebba54b666f broke xentrace: > > > > # xentrace -e 0x8f000 ./xentrace.out > > (XEN) Xen trace buffers: cpu 0 p 0000000000000000 > > The system you test on has 8 cpus, like mine. > t_info_pages got too big, so alloc_xenheap_pages() failed. > Can you add a printk to se whats happening in calculate_tbuf_size()? compile tested patch: # HG changeset patch # Parent c81f0ef5a77d90fbf108d3efe489d08df45b63c2 xentrace: print calculated numbers in calculate_tbuf_size() Print number of pages to allocate for per-cpu tracebuffer and metadata to ease debugging when allocation fails. Signed-off-by: Olaf Hering diff -r c81f0ef5a77d xen/common/trace.c --- a/xen/common/trace.c Mon Mar 21 14:52:27 2011 +0000 +++ b/xen/common/trace.c Mon Mar 21 21:49:52 2011 +0100 @@ -127,6 +127,8 @@ t_info_pages /= PAGE_SIZE; if ( t_info_pages % PAGE_SIZE ) t_info_pages++; + gdprintk(XENLOG_INFO, "requested %u t_info_pages for %u trace pages on %u cpus\n", + t_info_pages, pages, num_online_cpus()); return pages; }