Re: [RFC] Un-staticise the toolchain

From: John Baldwin <jhb_at_freebsd.org>
Date: Thu, 3 May 2012 14:47:00 -0400
On Thursday, May 03, 2012 5:18:15 am Erik Cederstrand wrote:
> Den 02/05/2012 kl. 13.56 skrev John Baldwin:
> >> 
> >> Static version:
> >> * 0.09 ms spent execve'ing /usr/bin/make
> >> * The rest is mostly sysctl calls
> >> 
> >> Dynamic version:
> >> * 0.09 ms spent execve'ing ./dynamicmake and /libexec/ld-elf.so.1
> >> * 0.18 ms spent loading libc.so.7 (incl. reading /etc/libmap.conf and 
/var/run/ld-elf.so.hints)
> >> * 0.11 ms spent calling sysarch(0x81,0x7fffffffXXXX) (static version also 
does this but only uses 0.01 ms. No idea why)
> >> * The rest is mostly sysctl and sigprocmask calls
> > 
> > Keep in mind that the first time each system call is invoked, the runtime
> > linker has to resolve the symbol.  You can force the linker to do all
> > that when the object is loaded instead by setting LD_BIND_NOW=yes in the
> > environment of dynamicmake.  If that makes the sysarch() call take 0.01
> > ms, then you know that the extra 0.10 ms is because of rtld doing the
> > lookup of sysarch() on the first sysarch() call.
> 
> Thanks for the suggestion. There is only a single sysarch() call in each 
version so I'm not sure that would help. Anyway, setting LD_BIND_NOW in the 
dynamic case just made the sysarch() call 0.20 ms slower without speeding up 
anything else.

Hummm, that's odd that it was even slower.

-- 
John Baldwin
Received on Thu May 03 2012 - 17:11:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:26 UTC