kernel_optimize_test/arch/x86/boot
Denys Vlasenko 9b706aee7d x86: trivial printk optimizations
In arch/x86/boot/printf.c gets rid of unused tail of digits: const char
*digits = "0123456789abcdefghijklmnopqrstuvwxyz"; (we are using 0-9a-f
only)

Uses smaller/faster lowercasing (by ORing with 0x20)
if we know that we work on numbers/digits. Makes
strtoul smaller, and also we are getting rid of

  static const char small_digits[] = "0123456789abcdefx";
  static const char large_digits[] = "0123456789ABCDEFX";

since this works equally well:

  static const char digits[16] = "0123456789ABCDEF";

Size savings:

$ size vmlinux.org vmlinux
   text    data     bss     dec     hex filename
 877320  112252   90112 1079684  107984 vmlinux.org
 877048  112252   90112 1079412  107874 vmlinux

It may be also a tiny bit faster because code has less
branches now, but I doubt it is measurable.

[ hugh@veritas.com: uppercase pointers fix ]

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-09 23:24:09 +01:00
..
compressed x86: rename LARGE_PAGE_SIZE to PMD_PAGE_SIZE 2008-02-04 16:48:08 +01:00
tools i386: move boot 2007-10-11 11:16:41 +02:00
.gitignore i386: move boot 2007-10-11 11:16:45 +02:00
a20.c i386: move boot 2007-10-11 11:16:45 +02:00
apm.c x86: compile apm and voyager module only when selected in Kconfig 2008-01-30 13:32:49 +01:00
bitops.h i386: move boot 2007-10-11 11:16:45 +02:00
boot.h x86 setup: add missing prototype; formatting fix 2008-01-30 13:33:03 +01:00
cmdline.c x86 setup: add missing prototype; formatting fix 2008-01-30 13:33:03 +01:00
code16gcc.h i386: move boot 2007-10-11 11:16:45 +02:00
copy.S i386: move boot 2007-10-11 11:16:45 +02:00
cpu.c x86 setup: print missing CPU features in cleartext 2008-02-04 16:48:00 +01:00
cpucheck.c x86: arch/x86/Kconfig.cpu unification 2007-11-12 21:02:19 +01:00
edd.c x86 setup: add note to use edd=off on EDD probing hangs 2008-01-30 13:33:03 +01:00
header.S i386: handle an initrd in highmem (version 2) 2008-01-30 13:32:51 +01:00
install.sh i386: move boot 2007-10-11 11:16:45 +02:00
main.c x86 setup: guard the heap against invalid stack setups 2008-01-30 13:33:04 +01:00
Makefile x86 setup: print missing CPU features in cleartext 2008-02-04 16:48:00 +01:00
mca.c i386: move boot 2007-10-11 11:16:45 +02:00
memory.c i386: move boot 2007-10-11 11:16:45 +02:00
mkcpustr.c x86 setup: print missing CPU features in cleartext 2008-02-04 16:48:00 +01:00
mtools.conf.in i386: move boot 2007-10-11 11:16:45 +02:00
pm.c x86 setup: correct the base in the GDT_ENTRY() macro 2008-01-30 13:33:04 +01:00
pmjump.S x86 setup: use X86_CR0_PE macro instead of hard-coded constant 2008-01-30 13:33:02 +01:00
printf.c x86: trivial printk optimizations 2008-02-09 23:24:09 +01:00
setup.ld i386: move boot 2007-10-11 11:16:45 +02:00
string.c i386: move boot 2007-10-11 11:16:45 +02:00
tty.c i386: move boot 2007-10-11 11:16:45 +02:00
version.c i386: move boot 2007-10-11 11:16:45 +02:00
vesa.h i386: move boot 2007-10-11 11:16:45 +02:00
video-bios.c x86 setup: display VESA graphics modes in vga=ask menu 2008-01-30 13:33:02 +01:00
video-vesa.c x86 setup: display VESA graphics modes in vga=ask menu 2008-01-30 13:33:02 +01:00
video-vga.c x86 setup: display VESA graphics modes in vga=ask menu 2008-01-30 13:33:02 +01:00
video.c x86 setup: display VESA graphics modes in vga=ask menu 2008-01-30 13:33:02 +01:00
video.h x86 setup: display VESA graphics modes in vga=ask menu 2008-01-30 13:33:02 +01:00
voyager.c x86: compile apm and voyager module only when selected in Kconfig 2008-01-30 13:32:49 +01:00