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

Re: [PATCH v4 3/3] unzstd: make helper symbols static



On 29.04.2021 13:27, Julien Grall wrote:
> On 21/04/2021 11:22, Jan Beulich wrote:
>> While for the original library's purposes these functions of course want
>> to be externally exposed, we don't need this, and we also don't want
>> this both to prevent unintended use and to keep the name space tidy.
>> (When functions have no callers at all, wrap them with a suitable
>> #ifdef.) This has the added benefit of reducing the resulting binary
>> size - while this is all .init code, it's still desirable to not carry
>> dead code.
> 
> So I understand the desire to keep the code close to Linux and removing 
> the dead code. However I am still not convinced that the approach taken 
> is actually worth the amount of memory saved.
> 
> How much memory are we talking about here?

There are no (runtime) memory savings, as is being said by the
description. There are savings on the image and symbol table sizes
(see below - .*.0/ holding files as produced without the patch
applied, while .*.1/ holding output with it in place), the image
size reduction part of which is - as also expressed by the
description - a nice side effect, but not the main motivation for
the change.

Jan

xen/.debug-info.0/:
total 64124
-rwxr-xr-x 1 jbeulich users  2817324 Apr 29 15:13 xen
-rwxr-xr-x 1 jbeulich users 33159787 Apr 29 15:13 xen.efi
-rw-r--r-- 1 jbeulich users   382568 Apr 29 15:13 xen.efi.map
-rw-r--r-- 1 jbeulich users  1233207 Apr 29 15:13 xen.gz
-rwxr-xr-x 1 jbeulich users 27616424 Apr 29 15:13 xen-syms
-rw-r--r-- 1 jbeulich users   382569 Apr 29 15:13 xen-syms.map

xen/.debug-info.1/:
total 64092
-rwxr-xr-x 1 jbeulich users  2809132 Apr 29 15:15 xen
-rwxr-xr-x 1 jbeulich users 33155283 Apr 29 15:14 xen.efi
-rw-r--r-- 1 jbeulich users   380862 Apr 29 15:15 xen.efi.map
-rw-r--r-- 1 jbeulich users  1230365 Apr 29 15:15 xen.gz
-rwxr-xr-x 1 jbeulich users 27608800 Apr 29 15:14 xen-syms
-rw-r--r-- 1 jbeulich users   380863 Apr 29 15:14 xen-syms.map

xen/.stripped.0/:
total 10876
-rwxr-xr-x 1 jbeulich users 2817324 Apr 29 15:16 xen
-rwxr-xr-x 1 jbeulich users 3143360 Apr 29 15:16 xen.efi
-rw-r--r-- 1 jbeulich users  382568 Apr 29 15:16 xen.efi.map
-rw-r--r-- 1 jbeulich users 1233197 Apr 29 15:16 xen.gz
-rwxr-xr-x 1 jbeulich users 3169360 Apr 29 15:16 xen-syms
-rw-r--r-- 1 jbeulich users  382569 Apr 29 15:16 xen-syms.map

xen/.stripped.1/:
total 10840
-rwxr-xr-x 1 jbeulich users 2809132 Apr 29 15:15 xen
-rwxr-xr-x 1 jbeulich users 3136552 Apr 29 15:15 xen.efi
-rw-r--r-- 1 jbeulich users  380862 Apr 29 15:15 xen.efi.map
-rw-r--r-- 1 jbeulich users 1230352 Apr 29 15:15 xen.gz
-rwxr-xr-x 1 jbeulich users 3159376 Apr 29 15:15 xen-syms
-rw-r--r-- 1 jbeulich users  380863 Apr 29 15:15 xen-syms.map




 


Rackspace

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