public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Martin.Runge@rohde-schwarz.com, gdb-patches@sourceware.org
Subject: Re: [PATCH] Avoid most open and stat syscalls when setting a  breakpoint
Date: Tue, 27 Apr 2010 18:54:00 -0000	[thread overview]
Message-ID: <20100427185438.GA6527@adacore.com> (raw)
In-Reply-To: <m3k4s2gge2.fsf@fleche.redhat.com>

> Martin> I think that most of these checks are not neccessary, e.g. to
> Martin> compare if
> Martin> /home/me/project/source/main.cpp
> Martin> becomes the same file as  <iostream>  when trying all source paths on 
> Martin> main.cpp. The patch below leaves the described search loop when the 
> Martin> basename from the symtab and the basename from the break command do not 
> Martin> match, as they wont match by appliing different paths either.
> 
> ISTR seeing this same patch in the past.

Me too - I just got a little surprise today while looking at AdaCore's
diff, finding the exact type of patch in AdaCore's tree as well :-o.

> So, I think this patch is not correct, or at least, it changes gdb
> incompatibly.  I don't know how much this symlink thing matters in
> practice.  Maybe there is some other way to solve this problem, but I
> haven't looked into it deeply.

I agree on the conclusion - the change can be disruptive if the user
uses symlinks.

However, I am wondering if this is worth considering, given how slow
the IO on some filesystems can be (some users even use a remote FS,
which is even worse). But the compatibility is a real issue.

It's not trivial to do the archeology and try to figure out how long
we've had this change in AdaCore's tree, but I think it's been many
years, and I believe from customer feedback that this has made a
noticeable impact (we have some customers who are very sensitive to
filesystem access explosions).

I'm not sure how common (or uncommon) it is to use symlinks in source
trees, and I'm not willing to take a bet on this. Peharps the only way
forward is to has a user setting that allows us to turn the optimization
off in the case when there are symlinks?

(just thinking out loud)

-- 
Joel

  reply	other threads:[~2010-04-27 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15 10:20 Martin.Runge
2010-04-20 17:53 ` Tom Tromey
2010-04-27 18:54   ` Joel Brobecker [this message]
2010-04-28  8:53     ` Antwort: " Martin.Runge

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=20100427185438.GA6527@adacore.com \
    --to=brobecker@adacore.com \
    --cc=Martin.Runge@rohde-schwarz.com \
    --cc=gdb-patches@sourceware.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).