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
* [Bug symtab/11198] Performance problem in find_minsym_and_objfile
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 ` tromey at redhat dot com
2010-01-20 19:00 ` tromey at redhat dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2010-01-20 16:11 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at redhat dot com
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
* [Bug symtab/11198] Performance problem in find_minsym_and_objfile
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2010-01-20 19:00 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2010-01-20 19:00 -------
Created an attachment (id=4543)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4543&action=view)
proposed patch
Please try this patch.
If it works for you, I will check it in.
Thanks.
--
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
* [Bug symtab/11198] Performance problem in find_minsym_and_objfile
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
4 siblings, 0 replies; 6+ messages in thread
From: andre dot poenitz at nokia dot com @ 2010-01-21 14:45 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From andre dot poenitz at nokia dot com 2010-01-21 14:45 -------
Yes, it solves the performance problem.
Time for the initial step into libQtCore.so is down to 0.4 seconds from 10.2
seconds, both "real" time averaged over four "warm" runs.
--
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
* [Bug symtab/11198] Performance problem in find_minsym_and_objfile
2010-01-20 16:10 [Bug symtab/11198] New: Performance problem in find_minsym_and_objfile andre dot poenitz at nokia dot com
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2010-01-21 17:12 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2010-01-21 17:12 -------
Subject: Bug 11198
CVSROOT: /cvs/src
Module name: src
Changes by: tromey@sourceware.org 2010-01-21 17:12:19
Modified files:
gdb : ChangeLog minsyms.c symtab.h glibc-tdep.c
Log message:
PR symtab/11198:
* symtab.h (lookup_minimal_symbol_and_objfile): Declare.
* minsyms.c (lookup_minimal_symbol_and_objfile): New function.
* glibc-tdep.c (find_minsym_and_objfile): Remove.
(glibc_skip_solib_resolver): Use
lookup_minimal_symbol_and_objfile.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11284&r2=1.11285
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/minsyms.c.diff?cvsroot=src&r1=1.70&r2=1.71
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/symtab.h.diff?cvsroot=src&r1=1.144&r2=1.145
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/glibc-tdep.c.diff?cvsroot=src&r1=1.12&r2=1.13
--
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
* [Bug symtab/11198] Performance problem in find_minsym_and_objfile
2010-01-20 16:10 [Bug symtab/11198] New: Performance problem in find_minsym_and_objfile andre dot poenitz at nokia dot com
` (3 preceding siblings ...)
2010-01-21 17:12 ` cvs-commit at gcc dot gnu dot org
@ 2010-01-21 17:15 ` tromey at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2010-01-21 17:15 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2010-01-21 17:15 -------
Thanks for trying this.
I've checked in the fix.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
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).