Re: [RFC] Un-staticise the toolchain

看板FB_current作者時間13年前 (2012/05/03 17:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串29/30 (看更多)
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= _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1Feb2KJU (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1Feb2KJU (FB_current)