Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 29 Jun 2011 16:19:45 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: Anti-bloat side project

* Rich Felker <dalias@...ifal.cx> [2011-06-27 17:43:00 -0400]:
> Of course a better question is... why does "hello world" need to load
> any modules anyway? Perhaps a best first step to fixing the problem
> would be to demodularize and static link any module that will always
> be loaded...

btw applications are worse even if they are written in c

gtk hello:
$ strace zenity --info --text=hello 2>&1 |wc -l
6491

x terminal emulators:
$ strace xterm -e /bin/true 2>&1 |wc -l
1214
$ strace urxvt -e /bin/true 2>&1 |wc -l
850

firefox with a newly created empty profile
(no extensions, and blank page):
$ strace -f firefox -P empty -url about:blank 2>&1 |wc -l
17980

(ff has many periodic timers and does many things in the
background so the number depends on how fast i kill the
apearing window but it's always >16000)


$ strace -c -Scalls zenity --info --text=hello
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 13.70    0.000181           0      1510       417 stat64
  9.84    0.000130           0      1277       573 open
 59.95    0.000792           1       988           getdents64
  2.42    0.000032           0       706           close
  1.97    0.000026           0       672           fstat64
  2.42    0.000032           0       560        92 read
  2.95    0.000039           0       174           mmap2
  6.74    0.000089           1       157           select
  0.00    0.000000           0       101        68 access
  0.00    0.000000           0        80           writev
  0.00    0.000000           0        58           gettimeofday
  0.00    0.000000           0        55           mprotect
  0.00    0.000000           0        36           poll
  0.00    0.000000           0        19           munmap
  0.00    0.000000           0        17           brk
  0.00    0.000000           0         8           uname
  0.00    0.000000           0         6           fcntl64
  0.00    0.000000           0         4           _llseek
  0.00    0.000000           0         4           futex
...
100.00    0.001321                  6463      1153 total

$ strace -c -Scalls -f firefox -P empty -url about:blank
...
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
  0.01    0.000104           0      2244      1010 close
  0.03    0.000355           0      2099       988 open
  0.01    0.000159           0      1924       520 stat64
  0.01    0.000093           0      1826           gettimeofday
  0.19    0.002521           2      1595       284 read
  0.00    0.000000           0      1112           fstat64
  0.03    0.000333           0       994           getdents64
  0.01    0.000160           0       662           mmap2
 64.14    0.849392        1361       624        26 futex
  0.01    0.000075           0       623         1 madvise
  0.00    0.000036           0       481           select
  0.00    0.000000           0       462       301 access
  0.01    0.000069           0       267           writev
  0.00    0.000000           0       228           fcntl64
  0.00    0.000000           0       213           mprotect
  0.00    0.000036           0       167           _llseek
  0.00    0.000000           0       160           clock_gettime
  0.00    0.000000           0       140           munmap
 16.92    0.224014        1882       119           poll
  0.00    0.000000           0        92         3 lstat64
  0.00    0.000000           0        53           write
  0.00    0.000000           0        52           rt_sigaction
  0.00    0.000000           0        51           lseek
  0.00    0.000000           0        46           brk
  0.00    0.000000           0        41           getdents
  0.00    0.000000           0        25           uname
  0.09    0.001185          59        20         4 execve
  0.24    0.003125         156        20           clone
  0.00    0.000000           0        19           pipe
  0.00    0.000000           0        18           socket
  0.00    0.000000           0        16           set_thread_area
  0.48    0.006364         424        15         2 wait4
  0.00    0.000000           0        15         7 connect
  0.00    0.000000           0        14           dup2
  0.00    0.000000           0        12           getuid32
  0.00    0.000000           0        11           geteuid32
  0.00    0.000000           0         9           time
  0.00    0.000000           0         8         1 readlink
  0.00    0.000000           0         8           sched_get_priority_max
  0.00    0.000000           0         8           getgroups32
  0.00    0.000000           0         7           sched_get_priority_min
  0.00    0.000000           0         7           set_robust_list
  0.00    0.000000           0         6           sched_setscheduler
  0.00    0.000000           0         5           getgid32
  0.00    0.000000           0         5           getegid32
  0.00    0.000000           0         4           getpid
  0.00    0.000000           0         4         4 mkdir
  0.00    0.000000           0         4           getppid
  0.00    0.000000           0         4           getsockname
...
100.00    1.324219                 16588      3153 total

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.