From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1759 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: ldso : dladdr support Date: Sat, 25 Aug 2012 08:35:00 -0400 Message-ID: <20120825123500.GM27715@brightrain.aerifal.cx> References: <20120817053934.GS27715@brightrain.aerifal.cx> <50311776.9040802@gmail.com> <20120820020626.GD27715@brightrain.aerifal.cx> <503233A8.8000604@gmail.com> <50324A60.7040206@gmail.com> <20120823213937.GS27715@brightrain.aerifal.cx> <20120823222113.GT27715@brightrain.aerifal.cx> <50372D59.7090604@gmail.com> <20120824183850.GH27715@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="f5QefDQHtn8hx44O" X-Trace: ger.gmane.org 1345898005 20519 80.91.229.3 (25 Aug 2012 12:33:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Aug 2012 12:33:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1760-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 25 14:33:26 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T5FYH-0000Jj-No for gllmg-musl@plane.gmane.org; Sat, 25 Aug 2012 14:33:21 +0200 Original-Received: (qmail 26305 invoked by uid 550); 25 Aug 2012 12:33:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 26297 invoked from network); 25 Aug 2012 12:33:19 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1759 Archived-At: --f5QefDQHtn8hx44O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Aug 25, 2012 at 09:42:38AM +0200, boris brezillon wrote: > >> Do you want me to do some specific tests ? > > > > Actually, the main thing I'm interested in is whether the bloom filter > > is ever beneficial. I took it out trying to streamline the code and > > shaved about 8% off the lookup time for symbols in the main program, > > but I didn't investigate how the change affects symbols not found in > > the first file searched. Would you be interested in running some tests > > to determine if it might be useful to try adding it back? > I'll do some tests with multiple levels of big libraries : prog -> > libtest -> libc -> libb -> liba ... > How do you get your perf results (specific tools, time measurement > inside libc code, time measurement in main program, ...)? I forgot to attach my test code. It's x86-specific (uses rdtsc because that's the most accurate way) but hopefully that's not a problem. Note: if searching for symbols in the main program like it's doing as I have it configured now, you'll need to compile with -rdynamic. Rich --f5QefDQHtn8hx44O Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gnuhash.c" #include #include static inline unsigned rdtsc() { unsigned x, dummy; __asm__ __volatile__ ( "rdtsc" : "=a"(x), "=d"(dummy) ); return x; } int main() { unsigned i, t0, t, tmin=-1; void *p; for (i=0; i<16; i++) { t0 = rdtsc(); p = dlsym(0, "main"); t = rdtsc()-t0; if (t