From: Roland Schwingel <Roland.Schwingel@onevision.de>
To: gdb <gdb@sources.redhat.com>
Subject: really really slow lookup_symtabs() - some obversations
Date: Fri, 20 Jun 2003 09:00:00 -0000 [thread overview]
Message-ID: <3EF2CA26.1030807@onevision.de> (raw)
Hi...
A while ago I posted a patch for gdbtk to avoid lookup_symtab() calls
because they appear to be
***very*** expensive in my environment. The patch made gdb more usable
again, but there are
still frequent calls to lookup_symtab() causing *heavy* slowdowns
(waiting 1 minute for one
lookup_symtab on a P4 1.5GHz is very common for me).
So I started out a new round. I found out that calling lookup_symtab
gets desperately slow
when the following 2 circumstances are met:
1. A lot of files involved in the executable (in my case >6000)
2. Calls to lookup_symtab with fully qualified name
I added some printfs in lookup_symtab for debugging:
.....
got_symtab:
/* First, search for an exact match */
printf ("lookup_symtab: ALL_SYMTABS\n");
ALL_SYMTABS (objfile, s)
{
if (FILENAME_CMP (name, s->filename) == 0)
{
printf ("lookup_symtab: found Case1\n");
return s;
}
....
}
printf ("lookup_symtab: After ALL_SYMTABS\n");
/* Now, search for a matching tail (only if name doesn't have any dirs) */
....
When called with a fully qualifed name I get a cascade of my printf
(at least hundreds mabe thousands) and I takes ages to complete
(as menitioned above) when called with a short name eg "foo.m"
I just get 3 to 8 of my printfs....
Does anyone know why all this is done for fully qualified names?
And maybe what can be done against?
Thanks for any infos,
Roland
PS: All stuff here mentioned concerns gdb 5.3 (to which I have to stick
until 6.0 is released)
reply other threads:[~2003-06-20 9:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3EF2CA26.1030807@onevision.de \
--to=roland.schwingel@onevision.de \
--cc=gdb@sources.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).