public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Roland Schwingel <roland@schwingel.com>
To: Keith Seitz <keiths@redhat.com>, gdb <gdb@sources.redhat.com>,
	gdb-owner@sources.redhat.com,
	"insight@sources.redhat.com" <insight@sources.redhat.com>
Subject: Re: gdb/Insight 5.3 really slow when stepping - patch submitted to gdb-patch list
Date: Fri, 23 May 2003 12:57:00 -0000	[thread overview]
Message-ID: <3ECE1AC4.60304@schwingel.com> (raw)

Hello Keith (and all lists this mail goes to... :-)

 > On Fri, 2003-05-23 at 02:42, Roland Schwingel wrote:
 > > The last 2 days I made 2 postings here. Maybe they were not correctly
 > > targeted. I today found the
 > > gdb-patches mailinglist where I just sent a diff to concerning the gdbtk
 > > stepping problem.
 >
 > Well, strictly speaking the patch should go to the insight list (insight
 > at sources dot redhat dot com), where I would see it.
Sorry I am not very familiar with the dependencies... I saw gdbtk issues
in the standard gdb list, so I first thought I would be right here...

 > However, I have to question why lookup_symtab is suddenly so painfully
 > slow? I don't have a problem applying the patch, but I want to make sure
 > first that you didn't uncover a real gdb problem that no one knows
 > about.
Well... What shall I say. I (we) are using gdb (using gdbtk ui) since
gdb 5.0. And constantly gdb got slower from version to version. Recently
I updated the gdb which is used here inhouse to 5.3 (from 20030303 -
same source which is also used in native cygwin) and I noticed it got
even slower. Stepping from one line of code to the other took between
2 and 20 seconds (depending on the file which was visible). So after
seeing that it goes to be unusable I started out to track this
problem down. I started FileMonitor from SysInternals to watch disk
activity and watched whats happening. I saw on every step thousands
of filesystem open/getinfo/close events. It seems to me that it tries
to get infos for every object/type/symbol referenced by the current
file on every lookup. It tries to do this for lots of .h/.c/.m files
which are in any kind related to the current file. I don't know why
lookup_symtab() is doing this... The amount of lookups differs from
file to file which is showing in the sourcewin of gdbtk.

Finally when looking at gdb_find_file_command() which calls this
lookup_symtab() on every step, I saw that the sole purpose
of this function appears to be getting the full path of a file. When
stepping all the time the pathname was already fully qualified, so
when this is the case just check the presence of the file and then
return with the filename as full name if ok. Elsewise go the regular
way using lookup_symtab(). That is what my patch is doing now. I
think gdbtk uses this on every step to determin whether a file has
changed or not.

 > Hmm. You say you did this on 5.3 (for native cygwin?). What about a
 > newer version  -- have you tried a CVS snapshot or HEAD?
Yes I use the current gdb of cygwin (20030303), with a bunch of changes
to allow Objective C debugging. But it is also slow without these changes.
I will try to get the time to compile the current version. I checked out
head today... Unfortunately I am very busy with other stuff. I can't promise
it.

 > I used to use cygwin a lot around 5.3 time frame -- it was never that
 > slow. If I asked for a testcase which demonstrates the problem, do you
 > think you could provide me with one?
Puh.. Lets see whether I can construct one. We are using Objective C a lot,
maybe its related to this... And our applications are heavily multi threaded
and are relativly big about 30.000 files need to get compiled to get them
running. Our apps are mingw apps. I just use the cygwin gdb (from a fully
working cygwin environment)

Thanks for your help.

Roland

PS: I fixed another bug in gdbtk, where the filecombobox in the sourcewindow
     is not always showing all files. After doing a dynamic load the filenames
     which are brought by the newly loaded lib where missing.The fix apears
     to be easy. Where should I direct it to (the insight list or gdb-patch)?


             reply	other threads:[~2003-05-23 12:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23 12:57 Roland Schwingel [this message]
2003-05-23 13:10 ` Keith Seitz
2003-05-23 15:30 ` Andrew Cagney
2003-05-23 15:42   ` Roland Schwingel
  -- strict thread matches above, loose matches on Subject: below --
2003-05-23 13:43 Roland Schwingel
     [not found] <3ECDED23.6050105@onevision.de>
2003-05-23 11:59 ` Keith Seitz

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=3ECE1AC4.60304@schwingel.com \
    --to=roland@schwingel.com \
    --cc=gdb-owner@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=insight@sources.redhat.com \
    --cc=keiths@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).