linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add -Winline
@ 2004-01-14  9:07 Andi Kleen
  2004-01-15 12:42 ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2004-01-14  9:07 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, jh


Add -Winline by default. This makes the compiler warn when something
marked inline is not getting inlined. This is often because the 

It should only make a difference with gcc 3.4, because in earlier
compilers we use always_inline and not inlining with always_inline
is an error already.

--- linux-34/Makefile-o	2004-01-09 09:27:08.000000000 +0100
+++ linux-34/Makefile	2004-01-14 09:36:18.172866544 +0100
@@ -448,6 +449,9 @@
 # warn about C99 declaration after statement
 CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,)
 
+# warn about impossible inlines
+CFLAGS += $(call check_gcc,-Winline,)
+
 #
 # INSTALL_PATH specifies where to place the updated kernel and system map
 # images.  Uncomment if you want to place them anywhere other than root.

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

* Re: [PATCH] Add -Winline
  2004-01-14  9:07 [PATCH] Add -Winline Andi Kleen
@ 2004-01-15 12:42 ` Adrian Bunk
  2004-01-15 12:55   ` Jan Hubicka
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2004-01-15 12:42 UTC (permalink / raw)
  To: Andi Kleen; +Cc: akpm, linux-kernel, jh

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

On Wed, Jan 14, 2004 at 10:07:43AM +0100, Andi Kleen wrote:
> 
> Add -Winline by default. This makes the compiler warn when something
> marked inline is not getting inlined. This is often because the 
> 
> It should only make a difference with gcc 3.4, because in earlier
> compilers we use always_inline and not inlining with always_inline
> is an error already.
>...

Attached are all inlining warnings I get with this patch applied in
2.6.1-mm3 using gcc 3.3.3 20040110 (prerelease) (Debian).

I've gzip'ed it since it was > 100 kB.

A few warnings might be missing since I used a .config with 
CONFIG_SMP=y.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


[-- Attachment #2: inlining-2.6.1-mm3.gz --]
[-- Type: application/x-gunzip, Size: 5296 bytes --]

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

* Re: [PATCH] Add -Winline
  2004-01-15 12:42 ` Adrian Bunk
@ 2004-01-15 12:55   ` Jan Hubicka
  2004-01-17  1:12     ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Hubicka @ 2004-01-15 12:55 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andi Kleen, akpm, linux-kernel, jh

> On Wed, Jan 14, 2004 at 10:07:43AM +0100, Andi Kleen wrote:
> > 
> > Add -Winline by default. This makes the compiler warn when something
> > marked inline is not getting inlined. This is often because the 
> > 
> > It should only make a difference with gcc 3.4, because in earlier
> > compilers we use always_inline and not inlining with always_inline
> > is an error already.
> >...
> 
> Attached are all inlining warnings I get with this patch applied in
> 2.6.1-mm3 using gcc 3.3.3 20040110 (prerelease) (Debian).
> 
> I've gzip'ed it since it was > 100 kB.
> 
> A few warnings might be missing since I used a .config with 
> CONFIG_SMP=y.

Are you sure that you do use always_inline?  (ie can you look into one
of preprocessed file for declaration of some of failed functions?)

Honza
> 
> cu
> Adrian
> 
> -- 
> 
>        "Is there not promise of rain?" Ling Tan asked suddenly out
>         of the darkness. There had been need of rain for many days.
>        "Only a promise," Lao Er said.
>                                        Pearl S. Buck - Dragon Seed
> 



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

* Re: [PATCH] Add -Winline
  2004-01-15 12:55   ` Jan Hubicka
@ 2004-01-17  1:12     ` Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-01-17  1:12 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: Andi Kleen, akpm, linux-kernel

On Thu, Jan 15, 2004 at 01:55:44PM +0100, Jan Hubicka wrote:
> > On Wed, Jan 14, 2004 at 10:07:43AM +0100, Andi Kleen wrote:
> > > 
> > > Add -Winline by default. This makes the compiler warn when something
> > > marked inline is not getting inlined. This is often because the 
> > > 
> > > It should only make a difference with gcc 3.4, because in earlier
> > > compilers we use always_inline and not inlining with always_inline
> > > is an error already.
> > >...
> > 
> > Attached are all inlining warnings I get with this patch applied in
> > 2.6.1-mm3 using gcc 3.3.3 20040110 (prerelease) (Debian).
> > 
> > I've gzip'ed it since it was > 100 kB.
> > 
> > A few warnings might be missing since I used a .config with 
> > CONFIG_SMP=y.
> 
> Are you sure that you do use always_inline?  (ie can you look into one
> of preprocessed file for declaration of some of failed functions?)

Yes, e.g. in drivers/ieee1394/eth1394.c:

<--  snip  -->

...
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) 
void purge_partial_datagram(struct list_head *old)
{
...

<--  snip  -->


> Honza

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2004-01-17  1:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-14  9:07 [PATCH] Add -Winline Andi Kleen
2004-01-15 12:42 ` Adrian Bunk
2004-01-15 12:55   ` Jan Hubicka
2004-01-17  1:12     ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).