Printk Size Info

From eLinux.org
Jump to: navigation, search

Tim Riker asks: does this mean all the message text was removed? or just a printk function? Tim Bird used to have some numbers about stripping all the message text as well.

Here is information about printk message size with various kernel configurations:

Instance 1 - x86, tiny config, with printk

- for tim_tiny_config1
- kernel version 2.6.1-tiny1
[tbird@tim_hp linux-2.6.1-tiny]$ size vmlinux
   text    data     bss     dec     hex filename
 760600  137888   35432  933920   e4020 vmlinux
- ll arch/i386/boot/bzImage = 448359

Instance 2 - x86, tiny config, without printk

- for tim_tiny_config1 (only change is CONFIG_PRINTK is turned off)
- kernel version 2.6.1-tiny1
[tbird@tim_hp linux-2.6.1-tiny]$ size vmlinux
   text    data     bss     dec     hex filename
 718956  139832   17896  876684   d608c vmlinux
- ll arch/i386/boot/bzImage = 432632

Instance 3 - x86, normal config, with printk

- for tim_hp_config
- kernel version 2.6.1-tiny1
[tbird@tim_hp linux-2.6.1-tiny]$ size vmlinux
   text    data     bss     dec     hex filename
1732010  515672  136512 2384194  246142 vmlinux
- ll arch/i386/boot/bzImage = 1080930

Instance 4 - x86, normal config, without printk

- for tim_hp_config (only changes are: CONFIG_EMBEDDED is on and CONFIG_PRINTK is off)
- kernel version 2.6.1-tiny1
[tbird@tim_hp linux-2.6.1-tiny]$ size vmlinux
   text    data     bss     dec     hex filename
1638295  520076  119072 2277443  22c043 vmlinux
- ll arch/i386/boot/bzImage = 1044856


Table of Results

Kernel Config printk? text data bss compressed image text % data % bss % image %
2.6.1-rc1-tiny normal yes 1732010 515672 136512 1080930 100% 100% 100% 100%
2.6.1-rc1-tiny normal no 1638295 520076 119072 1044856 95% 101% 87% 97%
2.6.1-rc1-tiny small yes 760600 137888 35432 448359 44% 27% 26% 42%
2.6.1-rc1-tiny small no 718956 139832 17896 432632 42% 27% 13% 40%
2.6.1-rc1-tiny small no same as above, %s vs. small config 95% 101% 50% 96%