Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 May 2012 14:47:00 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Erik Cederstrand <erik@cederstrand.dk>
Cc:        Gary Palmer <gpalmer@freebsd.org>, freebsd-current@freebsd.org
Subject:   Re: [RFC] Un-staticise the toolchain
Message-ID:  <201205031447.00299.jhb@freebsd.org>
In-Reply-To: <5140DD3A-63A1-42B0-A464-317E54C4185F@cederstrand.dk>
References:  <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <201205020756.47783.jhb@freebsd.org> <5140DD3A-63A1-42B0-A464-317E54C4185F@cederstrand.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205031447.00299.jhb>