All of lore.kernel.org
 help / color / mirror / Atom feed
* ACPI in -pre7 builds with -Os
@ 2003-10-13 23:14 J.A. Magallon
  2003-10-14  1:39 ` Ernst Herzberg
  0 siblings, 1 reply; 5+ messages in thread
From: J.A. Magallon @ 2003-10-13 23:14 UTC (permalink / raw)
  To: Lista Linux-Kernel

Hi all...

$subject:

drivers/acpi/Makefile:

ACPI_CFLAGS := -Os

Uh ?

-- 
J.A. Magallon <jamagallon()able!es>     \                 Software is like sex:
werewolf!able!es                         \           It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.23-pre7-jam1 (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk))

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ACPI in -pre7 builds with -Os
  2003-10-13 23:14 ACPI in -pre7 builds with -Os J.A. Magallon
@ 2003-10-14  1:39 ` Ernst Herzberg
  0 siblings, 0 replies; 5+ messages in thread
From: Ernst Herzberg @ 2003-10-14  1:39 UTC (permalink / raw)
  To: linux-kernel

On Dienstag, 14. Oktober 2003 01:14, J.A. Magallon wrote:
> Hi all...
>
> $subject:
>
> drivers/acpi/Makefile:
>
> ACPI_CFLAGS := -Os
>
> Uh ?

Looks like a bug. And a missing feature.

- ACPI_CFLAGS := -Os
+ ACPI_CFLAGS := -Os --bzip2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ACPI in -pre7 builds with -Os
@ 2003-10-21  4:57 Len Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Len Brown @ 2003-10-21  4:57 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Lista Linux-Kernel

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

On Mon, 2003-10-13 at 19:14, J.A. Magallon wrote: 
> Hi all...
> 
> $subject:
> 
> drivers/acpi/Makefile:
> 
> ACPI_CFLAGS := -Os
> 
> Uh ?

-0s saves us ~20% text size.

cheers,
-Len


[-- Attachment #2: Forwarded message - acpi code size --]
[-- Type: message/rfc822, Size: 4459 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 438 bytes --]

FYI,
Building 2.4.23 with gcc -Os (as the source tree currently does) shrinks
acpi text compared to gcc -O2.  How much -0s it saves depends on the
version of gcc:


19.5% gcc version 3.2.2 20030222 (RHL 9.0)
20.6% gcc version 3.3.1 20030930 (Fedora Test3)

as measured by text size for drivers/acpi.o with all modules excluded.

cheers,
-Len

attached the script I use to measure acpi size, and the results for -O2
and -Os on gcc 3.3.1.


[-- Attachment #2.1.2: report.acpi.size --]
[-- Type: text/plain, Size: 1198 bytes --]

#!/bin/bash
# summarize the size of ACPI in Linux

# ACPI kernel modules
MODULE_FILES=
#for MODULE in drivers/acpi/*.ko ; do
#	if [ -f $MODULE ] ; then
#		MODULE_FILES="$MODULE_FILES $MODULE"
#	fi
#done

MODULE_LIST="ac asus_acpi battery button fan processor thermal toshiba_acpi"
if [ "$MODULE_FILES" = "" ] ; then
	DIR=drivers/acpi
	for MODULE in $MODULE_LIST; do
		if [ -f $DIR/$MODULE.o ] ; then
			MODULE_FILES="$MODULE_FILES $DIR/$MODULE.o"
		fi
	done
fi


if [ "$MODULE_FILES" != "" ] ; then
	echo Loadable Module Sizes:
	size $MODULE_FILES
	echo
	echo Static Kernel Size:
fi

# ACPI obj files outside drivers/acpi
STATIC_FILES=
# acpi objects in base kernel
for FILE in arch/i386/kernel/acpi/built-in.o arch/i386/kernel/acpi*.o ; do
	if [ -f $FILE ] ; then
		STATIC_FILES="$STATIC_FILES $FILE"
	fi
done


# ACPI core driver
DRIVER_DIR=drivers/acpi
for DRIVER_OBJECT in acpi.o built-in.o ; do
	if [ -f $DRIVER_DIR/$DRIVER_OBJECT ] ; then
		STATIC_FILES="$STATIC_FILES $DRIVER_DIR/$DRIVER_OBJECT"
	fi
done


NUM_FILES=`echo $STATIC_FILES | wc -w`
if [ $NUM_FILES == 0 ] ; then
	echo $0: no acpi code present
elif [ $NUM_FILES == 1 ] ; then
	size $STATIC_FILES
else
	size -t $STATIC_FILES
fi


[-- Attachment #2.1.3: size.23.O2 --]
[-- Type: text/plain, Size: 889 bytes --]

Loadable Module Sizes:
   text	   data	    bss	    dec	    hex	filename
   1712	    212	     12	   1936	    790	drivers/acpi/ac.o
   8628	    884	     24	   9536	   2540	drivers/acpi/asus_acpi.o
   6220	    212	     12	   6444	   192c	drivers/acpi/battery.o
   2532	    212	     24	   2768	    ad0	drivers/acpi/button.o
   1423	    212	     12	   1647	    66f	drivers/acpi/fan.o
   9643	    212	    172	  10027	   272b	drivers/acpi/processor.o
   7543	    212	     16	   7771	   1e5b	drivers/acpi/thermal.o
   3451	     72	     24	   3547	    ddb	drivers/acpi/toshiba_acpi.o

Static Kernel Size:
   text	   data	    bss	    dec	    hex	filename
   3214	      8	    136	   3358	    d1e	arch/i386/kernel/acpi.o
    917	     52	      0	    969	    3c9	arch/i386/kernel/acpi_wakeup.o
 178384	   4194	   4888	 187466	  2dc4a	drivers/acpi/acpi.o
 182515	   4254	   5024	 191793	  2ed31	(TOTALS)

[-- Attachment #2.1.4: size.23.Os --]
[-- Type: text/plain, Size: 889 bytes --]

Loadable Module Sizes:
   text	   data	    bss	    dec	    hex	filename
   1294	    212	     12	   1518	    5ee	drivers/acpi/ac.o
   7249	    884	     24	   8157	   1fdd	drivers/acpi/asus_acpi.o
   5297	    212	     12	   5521	   1591	drivers/acpi/battery.o
   2031	    212	     24	   2267	    8db	drivers/acpi/button.o
   1098	    212	     12	   1322	    52a	drivers/acpi/fan.o
   7905	    212	    172	   8289	   2061	drivers/acpi/processor.o
   5894	    212	     16	   6122	   17ea	drivers/acpi/thermal.o
   2669	     72	     24	   2765	    acd	drivers/acpi/toshiba_acpi.o

Static Kernel Size:
   text	   data	    bss	    dec	    hex	filename
   3214	      8	    136	   3358	    d1e	arch/i386/kernel/acpi.o
    917	     52	      0	    969	    3c9	arch/i386/kernel/acpi_wakeup.o
 141584	   4194	   4888	 150666	  24c8a	drivers/acpi/acpi.o
 145715	   4254	   5024	 154993	  25d71	(TOTALS)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ACPI in -pre7 builds with -Os
  2003-10-14 16:50 Grover, Andrew
@ 2003-10-14 16:57 ` Marc-Christian Petersen
  0 siblings, 0 replies; 5+ messages in thread
From: Marc-Christian Petersen @ 2003-10-14 16:57 UTC (permalink / raw)
  To: Grover, Andrew, earny; +Cc: linux-kernel, linux-kernel

On Tuesday 14 October 2003 18:50, Grover, Andrew wrote:

Hi Andrew,

> > Looks like a bug. And a missing feature.
> > - ACPI_CFLAGS := -Os
> > + ACPI_CFLAGS := -Os --bzip2

> What does that do, excatly? (Obviously compression-related...) I
> couldn't find it in the gcc 3.2.2 documentation, is it new?

rotfl. I think it was meant as a joke ;)

ciao, Marc



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: ACPI in -pre7 builds with -Os
@ 2003-10-14 16:50 Grover, Andrew
  2003-10-14 16:57 ` Marc-Christian Petersen
  0 siblings, 1 reply; 5+ messages in thread
From: Grover, Andrew @ 2003-10-14 16:50 UTC (permalink / raw)
  To: earny, linux-kernel

> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of 
> Ernst Herzberg
> > ACPI_CFLAGS := -Os
> >
> > Uh ?
> 
> Looks like a bug. And a missing feature.
> 
> - ACPI_CFLAGS := -Os
> + ACPI_CFLAGS := -Os --bzip2

What does that do, excatly? (Obviously compression-related...) I
couldn't find it in the gcc 3.2.2 documentation, is it new?

Regards -- Andy

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-21  4:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-13 23:14 ACPI in -pre7 builds with -Os J.A. Magallon
2003-10-14  1:39 ` Ernst Herzberg
2003-10-14 16:50 Grover, Andrew
2003-10-14 16:57 ` Marc-Christian Petersen
2003-10-21  4:57 Len Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.