Date: Thu, 3 May 2012 11:18:15 +0200 From: Erik Cederstrand <erik@cederstrand.dk> To: John Baldwin <jhb@freebsd.org> Cc: Gary Palmer <gpalmer@freebsd.org>, freebsd-current@freebsd.org Subject: Re: [RFC] Un-staticise the toolchain Message-ID: <5140DD3A-63A1-42B0-A464-317E54C4185F@cederstrand.dk> In-Reply-To: <201205020756.47783.jhb@freebsd.org> References: <20120426093548.GR2358@deviant.kiev.zoral.com.ua> <20120501135530.GA50127@in-addr.com> <13119BE4-531E-4681-89F0-876DC272B18F@cederstrand.dk> <201205020756.47783.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Den 02/05/2012 kl. 13.56 skrev John Baldwin: >>=20 >> Static version: >> * 0.09 ms spent execve'ing /usr/bin/make >> * The rest is mostly sysctl calls >>=20 >> 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 >=20 > 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=3Dyes 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. Kind regards, Erik=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5140DD3A-63A1-42B0-A464-317E54C4185F>