From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 4 Sep 2010 00:58:09 -0700 Message-ID: From: Akshat Kumar To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] too many system calls. Topicbox-Message-UUID: 4f0b414e-ead6-11e9-9d60-3106f5b1d025 Is ratrace usable on native Plan 9 (I understand it's in use on 9vx thus far)? I don't see a /proc/n/syscall file for any of my processes; is there some kernel patch for this? Thanks, ak On Fri, Sep 3, 2010 at 10:14 PM, ron minnich wrote: > Glibc /bin/date on Linux runs around 140 system calls. A quick pass > with ratrace shows that plan 9 /bin/date has 10. > > The conclusion is clear: plan 9 date has way too much overhead. It's > 1/14 the number of system calls of Glibc; why's it so big? > > A quick pass on getpid() fixes the problem: > > #include =A0 =A0 =A0 =A0 > #include =A0 =A0 =A0 =A0 > #include =A0 =A0 =A0 =A0 > > int > getpid(void) > { > =A0 =A0 =A0 =A0return _tos->pid; > } > > Now we're down to seven system calls. 1/20 of glibc. Much better! :-) > > ron > >