[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 15/18] bug/x86/arm: Align bug_frames sections.



>>> On 11.09.16 at 22:35, <konrad.wilk@xxxxxxxxxx> wrote:
> Furthermore on x86 the bloat-o-meter detects that with this
> change:
> 
> [konrad@char xen]$ ~/linux/scripts/bloat-o-meter xen-syms xen-syms.align4
> add/remove: 0/0 grow/shrink: 3/14 up/down: 115/-1497 (-1382)
> function                                     old     new   delta
> mod_l1_entry                                1490    1587     +97
> p2m_switch_domain_altp2m_by_id               520     533     +13
> p2m_switch_vcpu_altp2m_by_id                 453     458      +5
> machine_kexec                                263     261      -2
> hvm_do_IRQ_dpci                              244     242      -2
> sh_page_fault__guest_4                      8252    8192     -60
> sh_audit_gw                                 1529    1462     -67
> validate_gl3e                                337     264     -73
> validate_gl4e                                449     375     -74
> p2m_altp2m_lazy_copy                         730     652     -78
> set_typed_p2m_entry                         1346    1259     -87
> virt_to_xen_l2e                              491     365    -126
> sh_x86_emulate_write__guest_4                443     288    -155
> p2m_mem_access_check                        1733    1576    -157
> sh_x86_emulate_cmpxchg__guest_4              512     349    -163
> __get_gfn_type_access                        709     542    -167
> map_pages_to_xen                            4430    4144    -286
> Total: Before=1974033, After=1972651, chg -0.07%
> 
> We end up making the binary file a bit smaller.

I'm fine with the change, but I'm having a very hard time buying the
above: The change you do is to code used only in assembly files _and_
is not affecting .text (and I assume the sizes above are .text ones),
yet all the functions listed above live in C ones. I can't help thinking
that there must be something else going on, or that we had an actual
problem before this.

> --- a/xen/include/asm-x86/bug.h
> +++ b/xen/include/asm-x86/bug.h
> @@ -98,6 +98,7 @@ extern const struct bug_frame __start_bug_frames[],
>      .popsection
>  
>      .pushsection .bug_frames.\type, "a", @progbits
> +        .p2align 2
>          .L\@bf:
>          .long (.L\@ud - .L\@bf) + \
>                 ((\line >> BUG_LINE_LO_WIDTH) << BUG_DISP_WIDTH)

This ought to be accompanied by removing the enforcing of alignment
in xen.lds.S.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.