From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/91 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Anti-bloat side project Date: Wed, 29 Jun 2011 16:19:45 +0200 Message-ID: <20110629141945.GL5036@port70.net> References: <20110627170806.GA24833@brightrain.aerifal.cx> <20110627211625.GC5036@port70.net> <20110627211909.GZ12592@brightrain.aerifal.cx> <20110627213805.GD5036@port70.net> <20110627213739.GA12592@brightrain.aerifal.cx> <20110627214300.GB12592@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309357204 15397 80.91.229.12 (29 Jun 2011 14:20:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2011 14:20:04 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-175-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jun 29 16:20:00 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QbvcV-0008NP-3p for gllmg-musl@lo.gmane.org; Wed, 29 Jun 2011 16:19:59 +0200 Original-Received: (qmail 14148 invoked by uid 550); 29 Jun 2011 14:19:58 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 14138 invoked from network); 29 Jun 2011 14:19:57 -0000 Content-Disposition: inline In-Reply-To: <20110627214300.GB12592@brightrain.aerifal.cx> User-Agent: Mutt/1.5.20 (2009-06-14) Xref: news.gmane.org gmane.linux.lib.musl.general:91 Archived-At: * Rich Felker [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