From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Anti-bloat side project
Date: Wed, 29 Jun 2011 16:19:45 +0200 [thread overview]
Message-ID: <20110629141945.GL5036@port70.net> (raw)
In-Reply-To: <20110627214300.GB12592@brightrain.aerifal.cx>
* Rich Felker <dalias@aerifal.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
next prev parent reply other threads:[~2011-06-29 14:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 17:08 Rich Felker
2011-06-27 21:16 ` Szabolcs Nagy
2011-06-27 21:19 ` Rich Felker
2011-06-27 21:38 ` Szabolcs Nagy
2011-06-27 21:37 ` Rich Felker
2011-06-27 21:43 ` Rich Felker
2011-06-29 14:19 ` Szabolcs Nagy [this message]
2011-06-29 19:27 ` Rich Felker
2011-06-29 20:03 ` Szabolcs Nagy
2011-08-16 13:03 ` Moritz Wilhelmy
2011-08-16 13:06 ` Rich Felker
2011-08-16 13:16 ` Moritz Wilhelmy
2011-08-16 13:52 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110629141945.GL5036@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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).