From: Gary Benson <gbenson@redhat.com>
To: dje@google.com
Cc: gdb-patches@sourceware.org, saugustine@google.com
Subject: Re: [RFA 5/4 take 2] Improved linker-debugger interface
Date: Fri, 20 Jul 2012 09:33:00 -0000 [thread overview]
Message-ID: <20120720093331.GB3153@redhat.com> (raw)
In-Reply-To: <20488.24252.142398.372836@ruffy2.mtv.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 259 bytes --]
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/
[-- Attachment #2: test.c --]
[-- Type: text/plain, Size: 681 bytes --]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <dlfcn.h>
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);
}
[-- Attachment #3: build.sh --]
[-- Type: application/x-sh, Size: 168 bytes --]
next prev parent reply other threads:[~2012-07-20 9:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 15:19 Gary Benson
2012-07-19 19:23 ` dje
2012-07-20 9:33 ` Gary Benson [this message]
2012-07-19 21:17 ` André Pönitz
2012-07-20 10:02 ` Gary Benson
2012-07-25 18:19 ` Tom Tromey
2012-07-25 18:22 ` Tom Tromey
2012-07-31 12:21 ` Gary Benson
2012-07-31 14:44 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120720093331.GB3153@redhat.com \
--to=gbenson@redhat.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=saugustine@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox