Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix deadlock on looped solib list
Date: Wed, 07 Apr 2010 22:39:00 -0000	[thread overview]
Message-ID: <m3k4siubtw.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20100407222411.GA2253@host0.dyn.jankratochvil.net> (Jan 	Kratochvil's message of "Thu, 8 Apr 2010 00:24:11 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Tom> I don't remember hearing about this... anybody know why this isn't
Tom> in the FSF GDB?

Jan> It should be checked-in:
Jan> 	[rfc][patch] Eliminate quadratic slow-down on number of solibs.
Jan> 	http://sourceware.org/ml/gdb-patches/2009-04/msg00548.html
Jan> It were multiple long threads across multiple months.

Thanks.  I misunderstood you to mean some local patch.

Jan> I have just found now Daniel J.'s (not checked in):
Jan> 	[RFC] Detect loops in the solib chain
Jan> 	http://sourceware.org/ml/gdb-patches/2008-07/msg00347.html

Bummer that this didn't go in.

Jan> This hashtab approach of mine is needlessly expensive.
Jan>  * One should do next<->prev crosschecking suggested above.

Jan>  * To find the loop one cannot just look for the first element as
Jan>  it may loop one some tail elements.  One cannot find the last
Jan>  element as ... one could get looping trying to find it.  Updating
Jan>  the "first" element to the current one each 2^n steps (with
Jan>  increasing n) should safely find the loop.  And much cheaper in
Jan>  the common non-looping case (and at most 2x expensive in the
Jan>  looping case).

I didn't understand what you meant but I guess "Brent's algorithm" (new
to me, I'm used to the old tortoise and hare from lisp hacking).

http://en.wikipedia.org/wiki/Cycle_detection#Brent.27s_algorithm

Tom


  reply	other threads:[~2010-04-07 22:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-03  9:23 Jan Kratochvil
2010-04-07 19:47 ` Tom Tromey
2010-04-07 22:24   ` Jan Kratochvil
2010-04-07 22:39     ` Tom Tromey [this message]
2010-04-09 15:42       ` [cancel] " Jan Kratochvil

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=m3k4siubtw.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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