public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/11198] New: Performance problem in find_minsym_and_objfile
@ 2010-01-20 16:10 andre dot poenitz at nokia dot com
  2010-01-20 16:11 ` [Bug symtab/11198] " tromey at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: andre dot poenitz at nokia dot com @ 2010-01-20 16:10 UTC (permalink / raw)
  To: gdb-prs

Each time I step the first time into code belonging to some library like QtCore
or QtGui, gdb goes to 100% CPU for 10-20 seconds. That time is spent almost
entirely in find_minsym_and_objfile (char *name, struct objfile **objfile_p) in
glibc-tdep.c. The change below removes the delay and does not seem to have ill
side-effects for me.

--- glibc-tdep.c.orig   2010-01-20 16:00:22.000000000 +0100
+++ glibc-tdep.c        2010-01-20 17:04:41.000000000 +0100
@@ -41,15 +41,12 @@
   ALL_OBJFILES (objfile)
     {
         struct minimal_symbol *msym;
-      ALL_OBJFILE_MSYMBOLS (objfile, msym)
-       {
-         if (SYMBOL_LINKAGE_NAME (msym)
-             && strcmp (SYMBOL_LINKAGE_NAME (msym), name) == 0)
-           {
+        msym = lookup_minimal_symbol (name, NULL, objfile);
+        if ( msym ) 
+         {
              *objfile_p = objfile;
              return msym;
-           }
-       }
+         }
     }

-- 
           Summary: Performance problem in find_minsym_and_objfile
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: symtab
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: andre dot poenitz at nokia dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11198

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-21 17:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-20 16:10 [Bug symtab/11198] New: Performance problem in find_minsym_and_objfile andre dot poenitz at nokia dot com
2010-01-20 16:11 ` [Bug symtab/11198] " tromey at redhat dot com
2010-01-20 19:00 ` tromey at redhat dot com
2010-01-21 14:45 ` andre dot poenitz at nokia dot com
2010-01-21 17:12 ` cvs-commit at gcc dot gnu dot org
2010-01-21 17:15 ` tromey at redhat dot com

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).