Where olpc machine spending time when using web broswer

Adam Jackson ajackson at redhat.com
Tue Mar 13 15:39:29 EDT 2007


On Tue, 2007-03-13 at 12:41 -0700, Andrew Burgess wrote:
> >Just as an aside, gcc generates some intensely dumb code:
> 
> >00000d80 <fbFetchPixel_x8r8g8b8>:
> >     d80:       55                      push   %ebp
> >     d81:       8b 04 90                mov    (%eax,%edx,4),%eax
> >     d84:       89 e5                   mov    %esp,%ebp
> >     d86:       5d                      pop    %ebp
> >     d87:       0d 00 00 00 ff          or     $0xff000000,%eax
> >     d8c:       c3                      ret    
> >     d8d:       8d 76 00                lea    0x0(%esi),%esi
> 
> >Yay for frame pointers on leaf functions!  I guess we can build X with
> >-momit-leaf-frame-pointer, it can't hurt but I have no idea if it'll
> >help measurably.  It certainly makes the code prettier:
> 
> >00000ce0 <fbFetchPixel_x8r8g8b8>:
> >     ce0:       8b 04 90                mov    (%eax,%edx,4),%eax
> >     ce3:       0d 00 00 00 ff          or     $0xff000000,%eax
> >     ce8:       c3                      ret    
> >     ce9:       8d b4 26 00 00 00 00    lea    0x0(%esi),%esi
> 
> Obviously a candidate for inlining too.

I wish.  The code is written the other way around.  Check out
fb/fbcompose.c:fetchProcForPicture() and callers.

In a real sense the function call isn't the overhead here.  You lose
much more just by touching video memory from the CPU.

- ajax




More information about the Devel mailing list