Where olpc machine spending time when using web broswer

William Cohen wcohen at redhat.com
Mon Mar 12 17:33:17 EDT 2007


Looked at where the processor spends its time when browsing the web.

Hardware configuration:

  OLPC Beta 2 machine
  Linksys USB200M USB 10/100 for ethernet connection
  4GB memorex Mini Travel Drive for storage of image


Software configuration:

  /tmp/olpc-redhat-stream-development-build-299-20070308_1417-devel_ext3.img
  kernel-2.6.21-20070309.olpc1p.dc5079fafb767e4
  oprofile-0.9.2-3.fc6


Started OProfile then started the browser up pointed at
www.redhat.com. Then went to the "Red Hat Magazine" link and read two
articles one about Green phone and the other about iostat. Shutdown
OProfile.


# opreport -t 5
CPU: CPU with timer interrupt, speed 0 MHz (estimated)
Profiling through timer interrupt
           TIMER:0|
   samples|      %|
------------------
     19279 50.6077 vmlinux-20070309.olpc1p.dc5079fafb767e4
     11959 31.3926 Xorg
                   TIMER:0|
           samples|      %|
         ------------------
             11121 92.9927 libfb.so
               372  3.1106 Xorg
               299  2.5002 libexa.so
               153  1.2794 libc-2.5.so
                12  0.1003 amd_drv.so
                 1  0.0084 libextmod.so
                 1  0.0084 evdev_drv.so
      6177 16.2147 python
                   TIMER:0|
           samples|      %|
         ------------------
              2619 42.3992 libxul.so
               756 12.2390 libpython2.4.so.1.0
               570  9.2278 libc-2.5.so
               566  9.1630 libmozjs.so
               223  3.6102 libcairo.so.2.10.3
               194  3.1407 libgobject-2.0.so.0.1200.9
               150  2.4284 libglib-2.0.so.0.1200.9
               145  2.3474 libpthread-2.5.so
               136  2.2017 libnspr4.so
...

I didn't have the debuginfo around so I just looked for instructions
locations getting lots of samples and then looked at the disassembled
libfb.so.  There are definitely some Xorg/libfb.so hotspots, six
location have 20% of the samples for libfb.so:

# opreport -t 5 -d /usr/bin/Xorg |sort -nrk 2|more
00000000 11121    92.9927  libfb.so                 (no symbols)
   00015820 507       4.5589	idiv  preceding this
   0001584a 506       4.5500	idiv  preceding this
   000157f8 468       4.2083	idivl preceding this
   000157b2 433       3.8935	idivl preceding this
   0000fc04 296       2.6616
   0000fc0b 132       1.1869
   0001592c 109       0.9801	back to back imul
   000158b5 108       0.9711
   000159b3 107       0.9621


libfb.so is spending about 17% of the time in Xorg (about 5% overall,
.31*17%) in divides. Divides are very on the Geode expensive; idiv are
24 cycles and the idivl are 40 cycles. Is there some way to turn this
into multiply and shift right operations? The multiply is 4 or 7
cycles and the shift is 2 cycles.

Looking for libxul.so hotspots. It doesn't seem to have any hotspots:

# opreport  -d /usr/bin/pythong |sort -nrk 2|more

00000000 2619     42.3992  libxul.so                (no symbols)
00000000 756      12.2390  libpython2.4.so.1.0      (no symbols)
00000000 566       9.1630  libmozjs.so              (no symbols)
   0015b3b7 78        2.9782
   00019277 26        3.4392
   0000ba07 17        3.0035
   001620b4 16        0.6109
   001620e0 11        0.4200
   001620de 10        0.3818
...


-Will



More information about the Devel mailing list