Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: ppluzhnikov@google.com (Paul Pluzhnikov)
Cc: brobecker@adacore.com (Joel Brobecker),
	tromey@redhat.com,         gdb-patches@sourceware.org
Subject: Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs.
Date: Tue, 23 Jun 2009 13:32:00 -0000	[thread overview]
Message-ID: <200906231332.n5NDWBD6003501@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <8ac60eac0906221832k142f048dwf0179c934cc6bca3@mail.gmail.com> from "Paul Pluzhnikov" at Jun 22, 2009 06:32:59 PM

Paul Pluzhnikov wrote:

> >> I also verified that create_overlay_event_breakpoint is not called for
> >> each solib (though it is called 7 times, which seems like 6 too many).
> >
> > Hmm, do you understand where the other calls come from?
> 
> I've attached a log (to avoid GMail line wrapping): 4 calls at startup,
> 3 more when all the solibs are loaded. I haven't debugged the exact reason;
> in my reading of the code it should only fire once after all solibs.

So from these backtraces it looks like the calls on startup are:

- one call after the main executable is loaded

- one call in solib_add after all the directly linked shared libraries
  are loaded

- one extra call in post_create_inferior:

    /* If the user sets watchpoints before execution having started,
     then she gets software watchpoints, because GDB can't know which
     target will end up being pushed, or if it supports hardware
     watchpoints or not.  breakpoint_re_set takes care of promoting
     watchpoints to hardware watchpoints if possible, however, if this
     new inferior doesn't load shared libraries or we don't pull in
     symbols from any other source on this target/arch,
     breakpoint_re_set is never called.  Call it now so that software
     watchpoints get a chance to be promoted to hardware watchpoints
     if the now pushed target supports hardware watchpoints.  */

- and finally one more call after the "magic" vsyscall solib is installed
  (from add_vsyscall_page)

I guess some of those could get removed by some more restructuring of the
code, but I'm not sure this is worth the effort.


The three subsequent calls all come from solib_add, presumably as more
shared libraries are loaded via dlopen?  If so, there's again probably
not a lot we can do about that.


> 2009-06-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
> 
> 	Revert 2009-05-14 breakpoint commit (no longer needed).
> 	* breakpoint.h (breakpoint_re_set_objfile): Remove
> 	* breakpoint.c (breakpoint_re_set_objfile): Likewise
> 	(create_overlay_event_breakpoint): Remove objfile parameter,
> 	iterate over all objfiles.
> 	* objfiles.c (objfile_relocate): Update.
> 	* symfile.c (new_symfile_objfile): Likewise.

This is OK.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2009-06-23 13:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 23:29 Paul Pluzhnikov
2009-04-21  1:06 ` Tom Tromey
2009-04-29 21:12   ` Paul Pluzhnikov
2009-05-12  8:48     ` Joel Brobecker
2009-05-12 21:21       ` Paul Pluzhnikov
2009-05-13  9:39         ` Joel Brobecker
2009-06-22 17:10         ` Ulrich Weigand
2009-06-22 18:56           ` Paul Pluzhnikov
2009-06-22 19:30             ` Ulrich Weigand
2009-06-22 19:42               ` Paul Pluzhnikov
2009-06-22 20:06                 ` Ulrich Weigand
2009-06-22 22:04                   ` Paul Pluzhnikov
2009-06-23  0:43                     ` Ulrich Weigand
2009-06-23  1:33                       ` Paul Pluzhnikov
2009-06-23 13:32                         ` Ulrich Weigand [this message]
2009-06-22 20:41             ` Doug Evans
2009-06-22 20:48               ` Michael Snyder

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=200906231332.n5NDWBD6003501@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.com \
    --cc=tromey@redhat.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