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: "Rik van Riel" <riel@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [Fwd: stack overflow "cause" found]
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 26 Jul 2006 22:46:42 +0100
Delivery-date: Wed, 26 Jul 2006 14:47:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acaw9SyIlo5RnHSITxy68UdeD4h4kAASrIOQ
Thread-topic: [Xen-devel] [Fwd: stack overflow "cause" found]
> > 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...

It would be nice if -O2 worked. Quite a scary change give the amount of inline 
asm  though...

Ian
 
> > 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel