From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26556 invoked by alias); 20 Jul 2012 09:33:50 -0000 Received: (qmail 26548 invoked by uid 22791); 20 Jul 2012 09:33:49 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from gbenson.demon.co.uk (HELO gbenson.demon.co.uk) (80.177.220.214) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Jul 2012 09:33:33 +0000 Date: Fri, 20 Jul 2012 09:33:00 -0000 From: Gary Benson To: dje@google.com Cc: gdb-patches@sourceware.org, saugustine@google.com Subject: Re: [RFA 5/4 take 2] Improved linker-debugger interface Message-ID: <20120720093331.GB3153@redhat.com> Mail-Followup-To: dje@google.com, gdb-patches@sourceware.org, saugustine@google.com References: <20120719151913.GF25093@redhat.com> <20488.24252.142398.372836@ruffy2.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20488.24252.142398.372836@ruffy2.mtv.corp.google.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00385.txt.bz2 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 259 dje@google.com wrote: > Not that you have to write it, but if you've got the beginnings of > something already :-), gdb should have a performance testsuite. FWIW, this is what I was using. Not much of a start, I know! Cheers, Gary -- http://gbenson.net/ --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="test.c" Content-length: 681 #include #include #include #include #include int main(int argc, char *argv[]) { time_t start; int count, i; if (argc != 2) { fprintf (stderr, "usage: %s COUNT\n", argv[0]); exit (EXIT_FAILURE); } count = atoi (argv[1]); start = time (NULL); for (i = 1; i <= count; i++) { char path[32]; void *handle; sprintf (path, "./lib%04d.so", i); handle = dlopen (path, RTLD_LAZY); if (handle == NULL) { fprintf (stderr, "%s: dlopen failed\n", path); exit (EXIT_FAILURE); } } printf ("%d libraries loaded in %d seconds.\n", count, time (NULL) - start); } --opJtzjQTFsWo+cga Content-Type: application/x-sh Content-Disposition: attachment; filename="build.sh" Content-Transfer-Encoding: quoted-printable Content-length: 198 #!/bin/sh=0A= =0A= gcc test.c -o test -ldl=0A= =0A= touch lib.c=0A= gcc -fPIC -c lib.c -o lib.o=0A= =0A= for i in $(seq 5000); do=0A= gcc -shared lib.o -o $(printf "lib%04d.so" $i)=0A= done=0A= --opJtzjQTFsWo+cga--