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

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [Fwd: stack overflow "cause" found]
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Wed, 26 Jul 2006 15:50:33 -0400
Delivery-date: Wed, 26 Jul 2006 12:51:05 -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>
Organization: Red Hat, Inc
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
Xen is compiled with no -O gcc option, meaning no optimization, and the
compiler does the safest thing imaginable.  This means that if a
function, say vmx_world_save(), calls the same inline a bazillion times,
the stack will have one block of local variables for each invocation of
that function!

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

Ian, Keir, which of these approaches do you prefer?


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
0xffff830000106800 do_dom0_op:                          968
0xffff8300001080cf do_dom0_op:                          968
0xffff830000137c64 construct_dom0:                      968
0xffff83000013a81e construct_dom0:                      968
0xffff8300001b1dbc vmx_vmexit_handler:                  632
0xffff8300001b2f58 vmx_vmexit_handler:                  632
0xffff8300001313ff arch_do_dom0_op:                     552
0xffff8300001327f3 arch_do_dom0_op:                     552
0xffff830000158660 emulate_privileged_op:               520
0xffff83000015a06c emulate_privileged_op:               520
0xffff830000114ce9 memory_exchange:                     488
0xffff83000011598a memory_exchange:                     488
0xffff83000010ce29 do_event_channel_op:                 464
0xffff83000014b033 do_mmu_update:                       456
0xffff83000014bd28 do_mmu_update:                       456
0xffff8300001224a2 sedf_adjust_weights:                 440
0xffff83000012271c sedf_adjust_weights:                 440
0xffff83000019c874 svm_instrlen:                        432
0xffff83000016f2c2 map_p2m_entry:                       408
0xffff830000170398 map_p2m_entry:                       408
0xffff830000169fb9 l2e_rw_fault:                        400
0xffff83000017d0c0 l2e_rw_fault:                        400
0xffff830000188881 l2e_rw_fault:                        400
0xffff830000196219 handle_mmio:                         400
0xffff8300001356d4 load_segments:                       384
0xffff8300001b9363 show_registers:                      384
0xffff8300001b9a60 show_registers:                      384
0xffff830000116079 do_multicall:                        376
0xffff8300001166bb do_multicall:                        376
0xffff830000165c39 resync_all:                          376
0xffff83000016683f resync_all:                          376
0xffff830000184174 resync_all:                          376
0xffff830000184d7a resync_all:                          376
0xffff830000125579 __print_symbol:                      368
0xffff83000012b42b panic:                               368
0xffff8300001468a8 mod_l2_entry:                        360
0xffff830000146fd5 mod_l2_entry:                        360
0xffff830000146fe4 mod_l3_entry:                        360
0xffff83000014772a mod_l3_entry:                        360
0xffff830000147739 mod_l4_entry:                        360
0xffff830000147ee7 mod_l4_entry:                        360
0xffff83000014a04a do_mmuext_op:                        360
0xffff83000014ad63 do_mmuext_op:                        360
0xffff830000136b7f hypercall_create_continuation:       352
0xffff83000017910d resync_all:                          344
0xffff830000179bf4 resync_all:                          344
0xffff830000151bf9 do_physdev_op:                       328
0xffff8300001521d1 do_physdev_op:                       328
0xffff8300001ab28c vmx_store_cpu_guest_regs:            312
0xffff8300001ab65a vmx_store_cpu_guest_regs:            312
0xffff830000173b36 alloc_shadow_page:                   304
0xffff83000014f60d ptwr_do_page_fault:                  296
0xffff83000014febb ptwr_do_page_fault:                  296
0xffff83000014da12 arch_memory_op:                      288
0xffff83000017de6f shadow_direct_map_fault:             288
0xffff8300001a3766 svm_dump_inst:                       288
0xffff8300001ad51e vmx_io_instruction:                  288
0xffff8300001adb4d vmx_io_instruction:                  288
0xffff83000011271a dump_domains:                        280
0xffff830000112b91 dump_domains:                        280
0xffff8300001ace82 check_for_null_selector:             280
0xffff8300001ad509 check_for_null_selector:             280
0xffff83000016030c shadow_map_l1_into_current_l2:       272
0xffff830000173048 shadow_map_l1_into_current_l2:       272
0xffff83000017e7a8 shadow_map_l1_into_current_l2:       272
0xffff8300001a9d48 vmx_initialize_guest_resources:      272
0xffff8300001c879c paging_init:                         272
0xffff83000010d4d4 __gnttab_map_grant_ref:              256
0xffff83000012780f vsnprintf:                           256
0xffff83000012842e scnprintf:                           256
0xffff83000014ee3a ptwr_emulated_update:                256
0xffff8300001afb43 vmx_set_cr0:                         256
0xffff8300001b05c9 vmx_set_cr0:                         256
0xffff8300001336d1 arch_domain_create:                  248
0xffff8300001342f0 arch_domain_create:                  248
0xffff83000010f7d3 gnttab_transfer:                     240
0xffff830000110456 grant_table_create:                  240
0xffff830000128333 snprintf:                            240
0xffff830000128584 sprintf:                             240
0xffff83000012aa7e printf:                              240
0xffff83000012b1e3 debugtrace_printk:                   240
0xffff83000014261b find_matching_ucodes:                240
0xffff8300001500a5 map_pages_to_xen:                    240
0xffff8300001c219a __start_xen:                         240
0xffff830000114845 translate_gpfn_list:                 232
0xffff830000114c78 translate_gpfn_list:                 232
0xffff830000115b27 do_memory_op:                        232
0xffff830000116067 do_memory_op:                        232
0xffff8300001af923 vmx_assist:                          224
0xffff8300001134a8 populate_physmap:                    216
0xffff8300001137d3 populate_physmap:                    216
0xffff83000012a742 guest_console_write:                 216
0xffff83000012a8de guest_console_write:                 216
0xffff83000011009a do_grant_table_op:                   208
0xffff8300001343e1 arch_set_info_guest:                 208
0xffff83000014d382 do_set_gdt:                          208
0xffff830000160c67 alloc_shadow_page:                   208
0xffff83000017f103 alloc_shadow_page:                   208
0xffff8300001c11c6 construct_default_ISA_mptable:       208
0xffff830000167697 shadow_l4_table:                     200
0xffff830000167d93 shadow_l4_table:                     200
0xffff83000017aa19 shadow_l4_table:                     200
0xffff83000017b115 shadow_l4_table:                     200
0xffff830000185bd6 shadow_l4_table:                     200
0xffff83000018630c shadow_l4_table:                     200
0xffff8300001bfa48 setup_ioapic_ids_from_mpc:           200
0xffff8300001bfe81 setup_ioapic_ids_from_mpc:           200



--
"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


--
"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