This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: very very slow symbol searches


On 22 Jan 2003 10:26:08 -0800, David Carlton <carlton@math.Stanford.EDU> said:
> On 22 Jan 2003 04:00:16 -0800, "Martin M. Hunt" <hunt@redhat.com> said:

>> Insight calls search_symbols twice on startup.  Sometime 2-4 weeks
>> ago, (builds from CVS on sources) Insight started taking a minute
>> or two to load when debugging itself.  It is very fast when
>> debugging small programs, but large things like insight or gdb take
>> forever.  At first glance the problem is that search_symbols() is
>> taking 20-30 seconds to return.

> Could you give some commands to reproduce this problem?  (Preferably
> using GDB to debug itself.)  I tried running GDB on itself and then
> typing 'info functions', and I don't see any significant time
> difference on current mainline GDB versus GDB 5.2 or 5.3.  (In both
> cases, the version of GDB being debugged current mainline GDB.)  I
> also tried running to main first, to pull in dynamic libraries
> (which shouldn't have debug info on my system, I think).  Without
> running to main, mainline GDB was actually the fastest, albeit only
> slightly so; with running to main, mainline GDB was slightly slower
> than 5.3 but dramatically faster than 5.2.

Of course, my patch would have affected 'info variables' more than
'info functions'.  So I did the same tests with 'info variables';
here, 5.2 is really slow, 5.3 and mainline are better, and actually
mainline is faster than 5.3 on the version where I run to main first.

At any rate, obviously I'm not managing to tickle this bug correctly.
It is nice to see the speedup since 5.2: somebody obviously did
something good there.  (Is it an effect of hashing symtabs, maybe, or
did 5.2 already do that?)

David Carlton
carlton@math.stanford.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]