On 07.16, J.A. Magallon wrote:
> 
> On 07.16, Gwenole Beauchesne wrote:
> > Hi,
> > 
> > > After some binary search and a 'couple' kernel builds, I narrowed the
> > > problem to mm/memory.c. With that file built at -O1:
> > >
> > > CFLAGS_memory.o = -O1
> > 
> > Very good! There are also other new options at -O2 related to profiling 
> > (in 3.3-hammer) but I don't exactly remember their names. If you could 
> > also try with them disabled.
> > 
> 
> This is even better: -Os _WORKS_
> This narrows search space. From info gcc:
> 
> `-Os'
>      Optimize for size.  `-Os' enables all `-O2' optimizations that do
>      not typically increase code size.  It also performs further
>      optimizations designed to reduce code size.
> 
>      `-Os' disables the following optimization flags:
>           -falign-functions  -falign-jumps  -falign-loops 
>           -falign-labels  -freorder-blocks -fprefetch-loop-arrays
> 
> I will try to get the assembler listings at -O2 and -Os and compare...
> 

As expected, -Os does more that disabling those things. With

CFLAGS_memory.o = -Os -falign-functions -falign-jumps -falign-loops -falign-labels 
-fprefetch-loop-arrays -freorder-blocks

it still WORKS. And the assembler is very different from -O2:
(just an example)

@@ -53,13 +45,11 @@
 .globl check_pgt_cache
    .type   check_pgt_cache, @function
 check_pgt_cache:
-   subl    $8, %esp
-   movl    pgt_cache_water+4, %eax
-   movl    %eax, 4(%esp)
-   movl    pgt_cache_water, %eax
-   movl    %eax, (%esp)
+   pushl   pgt_cache_water+4
+   pushl   pgt_cache_water
    call    do_check_pgt_cache
-   addl    $8, %esp
+   popl    %edx
+   popl    %ecx
    ret
    .size   check_pgt_cache, .-check_pgt_cache
    .section    .rodata.str1.1,"aMS",@progbits,1

But this is enough to fill a bug report. But where ? gcc.gnu.org does
not know anything about hammer. Any SuSE developer site ?

TIA


-- 
J.A. Magallon <[EMAIL PROTECTED]>      \                 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.22-pre5-jam1m (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-0.2mdk))

Reply via email to