Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] Test on solib load and unload
Date: Fri, 27 Sep 2013 14:09:00 -0000	[thread overview]
Message-ID: <20130927135957.GE6993@blade.nx> (raw)
In-Reply-To: <1380119209-25975-4-git-send-email-yao@codesourcery.com>

Hi Yao,

Yao Qi wrote:

> This patch is to add a test case to on the performance of GDB
> handling load and unload of shared library.

Thanks for writing this.  I ran it on the setup I had for testing the
probes code, and it does pick up on the differences between probes
and non-probes.

> +void
> +do_test (int number)
> +{
> +  void **handles;
> +  char libname[40];
> +  int i;
> +
> +  handles = malloc (sizeof (void *) * number);
> +
> +  for (i = 0; i < number; i++)
> +    {
> +      sprintf (libname, "solib-lib%d", i);
> +      handles[i] = dlopen (libname, RTLD_LAZY);
> +      if (handles[i] == NULL)
> +	{
> +	  printf ("ERROR on dlopen %s\n", libname);
> +	  return;
> +	}
> +    }
> +
> +  /* Unload shared libraries in different orders.  */
> +#ifndef SOLIB_DLCLOSE_REVERSED_ORDER
> +  for (i = 0; i < number; i++)
> +#else
> +  for (i = number - 1; i >= 0; i--)
> +#endif
> +    dlclose (handles[i]);
> +
> +  free (handles);
> +}

I'm not sure how important this is, but this test is profiling both
load and unload.  It's theoretically possible that a change could be
made that improved one phase while degrading the other, so it would
be nice to see separate timings if that's not too hard to implement.
For the avoidance of doubt I don't consider the absence of separate
timings a blocker.

Thanks,
Gary

-- 
http://gbenson.net/


  reply	other threads:[~2013-09-27 14:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25 14:27 [PATCH 0/3 V2] GDB Performance testing Yao Qi
2013-09-25 14:27 ` [PATCH 3/3] Test on solib load and unload Yao Qi
2013-09-27 14:09   ` Gary Benson [this message]
2013-09-27 15:16     ` Yao Qi
2013-09-27 15:50       ` Gary Benson
2013-09-25 14:27 ` [PATCH 1/3] New make target 'check-perf' and new dir gdb.perf Yao Qi
2013-10-09  5:13   ` Doug Evans
2013-10-10  0:29     ` Yao Qi
2013-10-15 17:14       ` Doug Evans
2013-09-25 14:27 ` [PATCH 2/3] Perf test framework Yao Qi
2013-10-09  6:37   ` Doug Evans
2013-10-10  3:04     ` Yao Qi
2013-10-15 20:14       ` Doug Evans
2013-10-06  1:44 ` [PATCH 0/3 V2] GDB Performance testing Yao Qi

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=20130927135957.GE6993@blade.nx \
    --to=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.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