WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [Fwd: stack overflow "cause" found]

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [Fwd: stack overflow "cause" found]
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Wed, 26 Jul 2006 16:49:21 -0400
Delivery-date: Wed, 26 Jul 2006 13:49:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <44C7C789.1030707@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Red Hat, Inc
References: <44C7C789.1030707@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
Rik van Riel wrote:

Xen really should not be doing this.  We could either uninline some of
these functions, or try gcc -O2 or gcc -Os.

OK, with -Os it doesn't quite build due to the built-ins not being
inlined.  With -O2 the stack usage changes dramatically...

Currently the top stack users are:

$ objdump -dS xen-syms | ./checkstack.pl x86_64
0xffff8300001c7c47 find_unisys_acpi_oem_table:          1296
0xffff83000011182e do_xen_version:                      1280
0xffff83000015bc3e x86_emulate_memop:                   1264
0xffff8300001adbaa vmx_world_save:                      1040
0xffff8300001aeac5 vmx_world_save:                      1040

0xffff8300001af923 vmx_assist:                          224

The function vmx_world_save is inlined into vmx_assist with -O2,
and the combined stack use is only 200 bytes, down from 1264 !

I guess we'll want to build Xen with -O2.  I'm testing a -O2 built
hypervisor right now...

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel